<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2016-07-28 Thu 02:19 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>小蟬之核 / core of cicada-nymph</title>
<meta name="generator" content="Org-mode" />
<meta name="author" content="謝宇恆 / XIE Yuheng" />
<link rel="stylesheet" href="https://xieyuheng.github.io/asset/css/page.css" type="text/css" media="screen" />
<script type="text/javascript">
/*
@licstart  The following is the entire license notice for the
JavaScript code in this tag.

Copyright (C) 2012-2013 Free Software Foundation, Inc.

The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version.  The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.

As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.


@licend  The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target = document.getElementById(id);
   if(null != target) {
     elem.cacheClassElem = elem.className;
     elem.cacheClassTarget = target.className;
     target.className = "code-highlighted";
     elem.className   = "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target = document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className = elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className = elem.cacheClassTarget;
 }
/*]]>*///-->
</script>
</head>
<body>
<div id="preamble" class="status">
近死之心 莫使復陽也
</div>
<div id="content">
<h1 class="title">小蟬之核 / core of cicada-nymph</h1>
<div id="table-of-contents">
<h2>overview</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org83a85fb"><span class="done todo">todo</span> </a>
<ul>
<li><a href="#org17c6098"><span class="todo _gt__lt_">&gt;&lt;</span> code generation for interfaces of data-structure</a></li>
<li><a href="#org3bab054"><span class="todo _gt__lt_">&gt;&lt;</span> the size of file</a></li>
<li><a href="#org2ddc6aa"><span class="todo _gt__lt_">&gt;&lt;</span> better structure for IO functions</a></li>
<li><a href="#org332885a"><span class="todo _gt__lt_">&gt;&lt;</span> write-with-color</a></li>
<li><a href="#orge76e229">type check</a></li>
<li><a href="#orgb37ea38"><span class="todo _gt__lt_">&gt;&lt;</span> view the core as a special module</a></li>
<li><a href="#orgfe64a08">optimize with type info</a></li>
<li><a href="#org1d9ccae">fast tangle</a></li>
<li><a href="#org5cac4b4">debug-REPL</a></li>
<li><a href="#org7dfa45b">漢語 alias</a></li>
<li><a href="#orge6cd90">language-level support for creating and managing processes</a></li>
</ul>
</li>
<li><a href="#orgcf3cebb">module-meta</a>
<ul>
<li><a href="#orge4a4c27">core-test</a></li>
</ul>
</li>
<li><a href="#org68161fb">writers</a>
<ul>
<li><a href="#org72c523a"><span class="todo note">note</span> name of writers</a></li>
<li><a href="#org80a12e7">.l .i .b</a></li>
</ul>
</li>
<li><a href="#orgbb44077">jojo-compiler-syntax</a>
<ul>
<li><a href="#orgd888f7"><span class="todo _">記</span> 條件轉跳</a></li>
<li><a href="#org1eebd3a">literal-word:[if|else|then]?</a></li>
<li><a href="#org4d643bd">jojo-compiler-syntax:if</a></li>
<li><a href="#org674cedd">jojo-compiler-syntax:else</a></li>
<li><a href="#org2b4a489">jojo-compiler-syntax:then</a></li>
<li><a href="#org4175bd9"><span class="done test">test</span> if &amp; else &amp; then</a></li>
<li><a href="#org30090f"><span class="done test">test</span> if &amp; else &amp; then by factorial</a></li>
<li><a href="#orgd113d2e">literal-word:loop?</a></li>
<li><a href="#orgb2aa0f5">jojo-compiler-syntax:loop</a></li>
<li><a href="#org5ee893">literal-word:recur?</a></li>
<li><a href="#org17ee00d">jojo-compiler-syntax:recur</a></li>
<li><a href="#org260849e"><span class="done test">test</span> loop &amp; recur by factorial</a></li>
<li><a href="#orgca0139d"><span class="done test">test</span> recur by fibonacci</a></li>
<li><a href="#orge1ff5f1">more,syntax-rule-set:jojo-compiler</a></li>
</ul>
</li>
<li><a href="#org8332aff">name &amp; name-hash-table</a>
<ul>
<li><a href="#orgc6ec085"><span class="todo note">note</span> </a></li>
<li><a href="#orgfd018c6">allocate</a>
<ul>
<li><a href="#org34028a2"><span class="todo note">note</span> </a></li>
<li><a href="#orgd3dd883">allocate-memory</a></li>
</ul>
</li>
<li><a href="#org57e407d"><b>name-hash-table</b></a></li>
<li><a href="#orgc8dfe12"><b>name-hash-table,string-area</b></a></li>
<li><a href="#org8a196a1">name-hash-table,string-area,stay</a></li>
<li><a href="#org89a397b">make-string,for-name</a></li>
<li><a href="#orgf15a08">name</a>
<ul>
<li><a href="#org202245c"><span class="todo note">note</span> </a></li>
<li><a href="#org2646ced">name-&gt;address</a></li>
<li><a href="#org1d5f41b">name,used?</a></li>
<li><a href="#orgcc8d3fc">name,used-as-jo?</a></li>
<li><a href="#orgd532a89">name-&gt;string</a></li>
<li><a href="#orgf209914">name,get-orbit-length</a></li>
<li><a href="#org781e4a1">name,get-orbiton</a></li>
<li><a href="#org54d7730">name,get-jo</a></li>
<li><a href="#orgdc09171">name,set-string</a></li>
<li><a href="#org4553191">name,set-orbit-length</a></li>
<li><a href="#org21160c9">name,set-orbiton</a></li>
<li><a href="#org40daefd">name,set-jo</a></li>
<li><a href="#org6834292">name,no-collision?</a></li>
</ul>
</li>
<li><a href="#org65692b5">name-hash-table</a>
<ul>
<li><a href="#orgd5a5b6c"><span class="todo note">note</span> interface</a></li>
<li><a href="#orgf72290">name-hash-table,hash</a></li>
<li><a href="#org8067df3">string-&gt;finite-carry-sum</a></li>
<li><a href="#orge1bbae">name-hash-table,search</a></li>
<li><a href="#orgf441e41">name-hash-table,insert</a></li>
<li><a href="#orgb0a4a5b">string-&gt;name</a></li>
<li><a href="#orgdb20f8c"><span class="todo note">note</span> about report</a></li>
<li><a href="#orga60ebc4">name-hash-table,report</a></li>
<li><a href="#org16668fd"><span class="done test">test</span> string-&gt;name &amp; name-&gt;string</a></li>
<li><a href="#orgb46f2c5">name-hash-table,find-jo</a></li>
<li><a href="#orgee9304a"><span class="done test">test</span> name-hash-table,find-jo</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#org1bbaa87">global-naming-stack &amp; name-record</a>
<ul>
<li><a href="#orgd3371f4"><span class="todo note">note</span> global-naming-stack</a></li>
<li><a href="#orga5ff813"><span class="todo note">note</span> name-record</a></li>
<li><a href="#orgdd21425"><b>global-naming-stack</b></a></li>
<li><a href="#orgfb94f71">name-record:[get|set]-old-jo</a></li>
<li><a href="#org62bea9b">name-record:[get|set]-name</a></li>
<li><a href="#org9709fe8">name-record:[get|set]-new-jo</a></li>
<li><a href="#org21b8aea">global-naming-stack:record-jo</a></li>
<li><a href="#org535ae38">global-naming-stack:delete-last-record</a></li>
<li><a href="#org269f325">jo,find-name</a></li>
<li><a href="#orgb14841b">name-hash-table,record-jo,by-link</a></li>
</ul>
</li>
<li><a href="#org1015b4a">jojo-compiler-syntax:quote</a>
<ul>
<li><a href="#org7dc5086">quote-word?</a></li>
<li><a href="#org2fbaee0">jojo-compiler-syntax:quote</a></li>
<li><a href="#org3ff7488">more,syntax-rule-set:jojo-compiler</a></li>
<li><a href="#org815b741"><span class="done test">test</span> jojo-compiler-syntax:quote</a></li>
</ul>
</li>
<li><a href="#org807fc85">scope-stack &amp; offset-record</a>
<ul>
<li><a href="#orgab49ed4"><b>scope-stack</b></a></li>
<li><a href="#org2f80411"><span class="todo note">note</span> offset-record</a></li>
<li><a href="#org6d8f0e8">offset-record,[get|set]-name</a></li>
<li><a href="#orgc62c40d">offset-record,[get|set]-offset</a></li>
<li><a href="#orgf289300">offset-record,scope-delimiter?</a></li>
<li><a href="#org77a1363">scope-stack:find</a></li>
<li><a href="#orgec2fc06">scope-stack:get-current-offset</a></li>
</ul>
</li>
<li><a href="#orgd19cfe2">await &amp; awake</a>
<ul>
<li><a href="#orgf2340b6"><span class="todo note">note</span> notation</a></li>
<li><a href="#org397f9b2"><b>awaiting-stack</b></a></li>
<li><a href="#orgb427d58"><span class="todo note">note</span> action</a></li>
<li><a href="#orgf929deb">action,[get|set]-function</a></li>
<li><a href="#org5121a5b">action,[get|set]-argument-stack-pointer</a></li>
<li><a href="#orga238126">action,[get|set]-return-stack-pointer</a></li>
<li><a href="#orga5dc5f1">action,[get|set]-name</a></li>
<li><a href="#org848857c">drop-awaiting-stack</a></li>
<li><a href="#orge28b7a6">awaiting-stack:find</a></li>
<li><a href="#orge5eec8d">await</a></li>
<li><a href="#org801f22e">action,apply</a></li>
<li><a href="#org7901692">action,reset-the-stack</a></li>
<li><a href="#org6dfcafa">awake</a></li>
<li><a href="#org4393d8b"><span class="done test">test</span> await &amp; awake</a></li>
</ul>
</li>
<li><a href="#org3888548">basic-REPL</a>
<ul>
<li><a href="#org3978c45">syntax-rule-set:*word-interpreter*</a></li>
<li><a href="#orgb56209b">word-interpreter</a></li>
<li><a href="#org872d949">word-interpreter-syntax:bye</a></li>
<li><a href="#org185be">bye,basic-REPL</a></li>
<li><a href="#orgf7aea9e">basic-REPL&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></a></li>
<li><a href="#org2f89078">number with base</a>
<ul>
<li><a href="#org241d316"><span class="todo _">記</span> 原理</a></li>
<li><a href="#org21726ed">remove-byte!</a></li>
<li><a href="#orgc9a7494"><span class="done test">test</span> remove-byte!</a></li>
<li><a href="#orgb217f0a">latin-byte?</a></li>
<li><a href="#org1a61861">latin-byte-&gt;number</a></li>
<li><a href="#org670e130">number-&gt;latin-byte</a></li>
<li><a href="#org5d67819">wild-digit-string?</a></li>
<li><a href="#org6843cad">wild-integer-string?</a></li>
<li><a href="#orge4742ba"><span class="done test">test</span> wild-integer-string?</a></li>
<li><a href="#org600eb5b">base#wild-integer-string?</a></li>
<li><a href="#orgf4c3e3b"><span class="done test">test</span> base#wild-integer-string?</a></li>
<li><a href="#org4cf9980">base#wild-integer-string-&gt;base-string</a></li>
<li><a href="#org46caf41">base#wild-integer-string-&gt;wild-integer-string</a></li>
<li><a href="#org8162a29"><span class="done test">test</span> base#wild-integer-string-&gt;base-string</a></li>
<li><a href="#org88b476">wild-integer-string-&gt;integer,with-base</a></li>
<li><a href="#orgacb9e4d">base#wild-integer-string-&gt;integer</a></li>
<li><a href="#org3bb783e"><span class="done test">test</span> base#wild-integer-string-&gt;integer</a></li>
<li><a href="#orgd50b903"><span class="todo note">note</span> writers</a></li>
<li><a href="#orgdae31cd">.#</a></li>
<li><a href="#org8640eb0">.#2 .#8 .#16</a></li>
<li><a href="#org558d28a"><span class="done test">test</span> .#</a></li>
</ul>
</li>
<li><a href="#org14dd7a7">init,syntax-rule-set:basic-REPL</a></li>
<li><a href="#orgf93fd00"><span class="done test">test</span> REPL</a></li>
</ul>
</li>
<li><a href="#org6657aae">jojo-compiler</a>
<ul>
<li><a href="#orgb429234">jojo-compiler,dispatch-word&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></a></li>
<li><a href="#org225f528">jojo-compiler,dispatch-word,fail</a></li>
<li><a href="#org5b771d8">jojo-compiler&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></a></li>
</ul>
</li>
<li><a href="#orgbf7b64d">define-function</a>
<ul>
<li><a href="#orgd956530">init,name-hash-table,by-link</a></li>
<li><a href="#orga96cf16">n-string-&gt;buffer!</a></li>
<li><a href="#orgbf5bca7"><span class="done test">test</span> n-string-&gt;buffer!</a></li>
<li><a href="#org11561b7">undo-jojo-compiler</a></li>
<li><a href="#orgca99faf">define-function&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></a></li>
<li><a href="#orgdddc6fb"><span class="done test">test</span> function</a></li>
</ul>
</li>
<li><a href="#org7678210"><b>to use the new naming mechanism</b></a>
<ul>
<li><a href="#orga43f894"><span class="todo note">note</span> </a></li>
<li><a href="#org972c082">switch</a></li>
</ul>
</li>
<li><a href="#orgd30e25a">fix syntax about local-variable</a>
<ul>
<li><a href="#org2a7906d">jojo-compiler-syntax:local-variable-get&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></a></li>
<li><a href="#orgcf52374">jojo-compiler-syntax:local-variable-set&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></a></li>
<li><a href="#orgec5d26d">jojo-compiler-syntax:if&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></a></li>
<li><a href="#org3f3470d">jojo-compiler-syntax:else&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></a></li>
<li><a href="#org412be2d">jojo-compiler-syntax:then&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></a></li>
<li><a href="#orgda46675">more,syntax-rule-set:jojo-compiler</a></li>
</ul>
</li>
<li><a href="#org85e223f">argument-stack:print</a>
<ul>
<li><a href="#org3d1ebce">argument-stack:print</a></li>
<li><a href="#orgf27605a">argument-stack:pretty-print</a></li>
</ul>
</li>
<li><a href="#orgcbe67d4">define-variable,with-tos</a>
<ul>
<li><a href="#orga4caeae">define-variable,with-tos&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></a></li>
<li><a href="#org5941ae1"><span class="done test">test</span> define-variable,with-tos</a></li>
</ul>
</li>
<li><a href="#org3316834">alias</a>
<ul>
<li><a href="#orgf5e530c"><span class="todo note">note</span> </a></li>
<li><a href="#orge40446b">alias</a></li>
<li><a href="#orgd695edb"><span class="done test">test</span> alias</a></li>
</ul>
</li>
<li><a href="#orgfadaa30">jojo-compiler-syntax:square-bar</a>
<ul>
<li><a href="#orge4e8dfe">string:find-word</a></li>
<li><a href="#org65622eb"><span class="done test">test</span> string:find-word</a></li>
<li><a href="#org66265bb"><span class="todo note">note</span> side-effect</a></li>
<li><a href="#orge3057ea"><span class="todo note">note</span> scope of named-local-variable</a></li>
<li><a href="#orgfc2b7f">literal-word:square-bar?</a></li>
<li><a href="#orgfe2f824">literal-word:square-ket?</a></li>
<li><a href="#org58f23f3"><span class="todo note">note</span> memory usage</a></li>
<li><a href="#orgdc871da">jojo-compiler-syntax:square-bar</a></li>
<li><a href="#orgec67c3e">jojo-compiler-syntax:square-ket</a></li>
<li><a href="#orgafeb66">more,syntax-rule-set:jojo-compiler</a></li>
<li><a href="#org67bb6c0"><span class="done test">test</span> square-bar &amp; square-ket by factorial</a></li>
</ul>
</li>
<li><a href="#org2a57a60">jojo-compiler-syntax:name</a>
<ul>
<li><a href="#org341e41f">jojo-compiler-syntax:name</a></li>
<li><a href="#org224ce68">more,syntax-rule-set:jojo-compiler</a></li>
<li><a href="#org18a85ca"><span class="done test">test</span> jojo-compiler-syntax:name</a></li>
</ul>
</li>
<li><a href="#org1d60b89">jojo-compiler-syntax:base#wild-integer-string</a>
<ul>
<li><a href="#org10177a4">jojo-compiler-syntax:base#wild-integer-string</a></li>
<li><a href="#org4c0a5bc">more,syntax-rule-set:jojo-compiler</a></li>
</ul>
</li>
<li><a href="#org83ca3d6">word-interpreter-syntax</a>
<ul>
<li><a href="#org243a93b">jo&#xa0;&#xa0;&#xa0;<span class="tag"><span class="syntax">syntax</span></span></a>
<ul>
<li><a href="#org82a0346">word-interpreter-syntax:jo</a></li>
<li><a href="#orgb303182">more,syntax-rule-set:basic-REPL</a></li>
</ul>
</li>
<li><a href="#orgb224a19">if &amp; else &amp; then&#xa0;&#xa0;&#xa0;<span class="tag"><span class="syntax">syntax</span></span></a>
<ul>
<li><a href="#org788b15a"><span class="todo note">note</span> ending jo</a></li>
<li><a href="#org4acd4ab"><span class="todo note">note</span> (end) in REPL</a></li>
<li><a href="#org3a9e108">word-interpreter-syntax:if,meet-true</a></li>
<li><a href="#org380d1d4">word-interpreter-syntax:if,meet-false</a></li>
<li><a href="#org97874">word-interpreter-syntax:if</a></li>
<li><a href="#org7f82f8f">syntax-rule:add to syntax-rule-set:*word-interpreter*</a></li>
<li><a href="#org41d4034"><span class="done test">test</span> word-interpreter-syntax:if &amp; else &amp; then</a></li>
</ul>
</li>
<li><a href="#org62f9985"><b>circular-string-area</b></a>
<ul>
<li><a href="#orgf313d26"><span class="todo note">note</span> </a></li>
<li><a href="#orgd8d0dd">allocate-memory</a></li>
</ul>
</li>
<li><a href="#orgb7c6494">double-quote&#xa0;&#xa0;&#xa0;<span class="tag"><span class="syntax">syntax</span></span></a>
<ul>
<li><a href="#org550e862">circular-string-area,stay</a></li>
<li><a href="#orgf08ee6f">word-interpreter-syntax:double-quote</a></li>
<li><a href="#org67d73e">syntax-rule:add to syntax-rule-set:*word-interpreter*</a></li>
<li><a href="#orge76615"><span class="done test">test</span> word-interpreter-syntax:double-quote</a></li>
</ul>
</li>
<li><a href="#orgc620ae1">address&#xa0;&#xa0;&#xa0;<span class="tag"><span class="syntax">syntax</span></span></a>
<ul>
<li><a href="#org923565e">word-interpreter-syntax:address</a></li>
<li><a href="#org95c79dd">syntax-rule:add to syntax-rule-set:*word-interpreter*</a></li>
<li><a href="#orgc9a3bc"><span class="done test">test</span> word-interpreter-syntax:address</a></li>
</ul>
</li>
<li><a href="#orgade10e">literal-word:name?</a></li>
<li><a href="#org52d61f1">name&#xa0;&#xa0;&#xa0;<span class="tag"><span class="syntax">syntax</span></span></a>
<ul>
<li><a href="#org8e1627">word-interpreter-syntax:name</a></li>
<li><a href="#org5177ad6">syntax-rule:add to syntax-rule-set:*word-interpreter*</a></li>
<li><a href="#orgadde5e3"><span class="done test">test</span> word-interpreter-syntax:name</a></li>
</ul>
</li>
<li><a href="#org8951c5d">quote</a>
<ul>
<li><a href="#orgeec7cc5">word-interpreter-syntax:quote</a></li>
<li><a href="#org3d4e28b">syntax-rule:add to syntax-rule-set:*word-interpreter*</a></li>
<li><a href="#org385a17"><span class="done test">test</span> word-interpreter-syntax:quote</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orga603b59"><b>a little test</b></a>
<ul>
<li><a href="#org392f184">nested comment</a></li>
<li><a href="#org9d06b2e">return structured value</a></li>
</ul>
</li>
<li><a href="#orgb283d9e">syntax-rule-set &amp; syntax-rule</a>
<ul>
<li><a href="#orgd55b758"><span class="done test">test</span> endianness of n-get &amp; n-set</a></li>
<li><a href="#org78b8814">syntax-rule-set:list</a></li>
<li><a href="#org8d8920e">syntax-rule:sub</a></li>
<li><a href="#orgc118875"><span class="done test">test</span> </a></li>
<li><a href="#org4a8a27">syntax-rule-set:mixin</a></li>
<li><a href="#org3d3f8bd">syntax-rule-set:mixout</a></li>
</ul>
</li>
<li><a href="#org560578f">stack-REPL</a>
<ul>
<li><a href="#orgc68719c"><span class="todo note">note</span> </a></li>
<li><a href="#orgf3ee27b">stack-REPL</a></li>
</ul>
</li>
<li><a href="#orgf2447c5">eval-string</a>
<ul>
<li><a href="#orga2836e4"><span class="todo note">note</span> </a></li>
<li><a href="#orgf018d91">eval-string</a></li>
<li><a href="#org5a36716"><span class="done test">test</span> eval-string</a></li>
</ul>
</li>
<li><a href="#org6f2f9bd">define-variable</a>
<ul>
<li><a href="#org746d944"><span class="todo note">note</span> string allocation</a></li>
<li><a href="#org673c897">syntax,double-quote,define-variable</a></li>
<li><a href="#org1f598c1">define-variable</a></li>
<li><a href="#org94208b5"><span class="done test">test</span> </a></li>
</ul>
</li>
<li><a href="#org8983de4">system misc</a>
<ul>
<li><a href="#org254a27c"><span class="todo note">note</span> linux</a></li>
<li><a href="#org5dc6135">init-syscall-number&#xa0;&#xa0;&#xa0;<span class="tag"><span class="32bit">32bit</span></span></a></li>
<li><a href="#orga4615e">init-syscall-number&#xa0;&#xa0;&#xa0;<span class="tag"><span class="64bit">64bit</span></span></a></li>
<li><a href="#orgded109">error-code-&gt;string</a></li>
<li><a href="#org818639d">file-type-code-&gt;string</a></li>
</ul>
</li>
<li><a href="#org11750ba">port</a>
<ul>
<li><a href="#org69665e4"><span class="todo _">記</span> 關於輸入輸出</a></li>
<li><a href="#orga4d7fd8"><span class="todo note">note</span> linux header</a></li>
<li><a href="#org4947fea"><span class="todo note">note</span> interface</a></li>
<li><a href="#orgb05fa42"><span class="todo note">note</span> syscall with string arguments</a></li>
<li><a href="#org7f6259e">port:open</a></li>
<li><a href="#orgbcb279">port:create</a></li>
<li><a href="#org76dc9a2">port:update</a></li>
<li><a href="#orgc93fcbc">port:close</a></li>
<li><a href="#orga0decf9">port:read</a></li>
<li><a href="#org343416b">port:write</a></li>
<li><a href="#org88b390e"><span class="done test">test</span> </a></li>
</ul>
</li>
<li><a href="#org6512969">file</a>
<ul>
<li><a href="#orgd55b9c7"><span class="todo note">note</span> interface</a></li>
<li><a href="#orgd76dc75"><span class="todo _">記</span> 元數據</a></li>
<li><a href="#org36410d1"></a></li>
<li><a href="#org82efd7e"></a></li>
<li><a href="#orgc5fe150"></a></li>
<li><a href="#org1b2d499"></a></li>
<li><a href="#org8c6749c"><span class="done test">test</span> file</a></li>
</ul>
</li>
<li><a href="#orgaed3820">directory</a>
<ul>
<li><a href="#org85133df">directory:create</a></li>
<li><a href="#org10cf538">directory:remove</a></li>
<li><a href="#orgfe31caa"><span class="done test">test</span> </a></li>
<li><a href="#org5ff9a79">system-getdents64</a></li>
<li><a href="#org5dbfb09"><span class="done test">test</span> </a></li>
<li><a href="#orgf432128">directory:empty?</a></li>
<li><a href="#orgd5774e8"><span class="done test">test</span> </a></li>
<li><a href="#orgc13c84a">directory:map</a></li>
<li><a href="#org83c5154"><span class="done test">test</span> </a></li>
<li><a href="#org5587dd9">directory:list-file</a></li>
<li><a href="#orga724d79">directory:list-directory</a></li>
<li><a href="#orged7cefa"><span class="done test">test</span> </a></li>
<li><a href="#org548e6a4">directory:find-file</a></li>
<li><a href="#orgb83a00e">directory:find-directory</a></li>
<li><a href="#orgff67f0a"><span class="done test">test</span> </a></li>
</ul>
</li>
<li><a href="#orge6bcf33">system environment</a>
<ul>
<li><a href="#org714a6af"><span class="todo note">note</span> linux</a>
<ul>
<li><a href="#org19e8099">one directory</a></li>
<li><a href="#org7269117">pid</a></li>
</ul>
</li>
<li><a href="#org356844e">[init|get]-pid</a></li>
<li><a href="#org76d4b0f">[init|get]-command-line</a></li>
<li><a href="#org56fe3b3">[init|get]-environment-variable-list</a></li>
<li><a href="#orga6768c">find-environment-variable</a></li>
<li><a href="#org644494">initialize system environment</a></li>
<li><a href="#orga2f2953"><b>home-directory</b></a></li>
<li><a href="#org2524544">report:environment-variable</a></li>
<li><a href="#orge0fad06">report:command-line</a></li>
</ul>
</li>
<li><a href="#org9970b8e">work-directory</a>
<ul>
<li><a href="#org821ec53">work-directory:get</a></li>
<li><a href="#org26e440">work-directory:change</a></li>
<li><a href="#orgf3b7c2e">pwd</a></li>
<li><a href="#orgff52b87">cd</a></li>
<li><a href="#org4244939"><span class="done test">test</span> </a></li>
</ul>
</li>
<li><a href="#orgf29e218">path</a>
<ul>
<li><a href="#org452d362">system-stat</a></li>
<li><a href="#org486d132"><span class="done test">test</span> </a></li>
<li><a href="#org7f30e1"><span class="todo note">note</span> predicate</a></li>
<li><a href="#org7df4b3d">path:nothing?</a></li>
<li><a href="#orge4b55b5">path:file?</a></li>
<li><a href="#org92d7663">path:directory?</a></li>
<li><a href="#org3f69b6e"><span class="done test">test</span> </a></li>
<li><a href="#orgcabdacb"><span class="todo _">記</span> 字符串的謂詞</a></li>
<li><a href="#org21f4d0e"><span class="todo _">記</span> unix 路徑格式</a></li>
<li><a href="#org988fe79">path:relative?</a></li>
<li><a href="#org4985020">path:full?</a></li>
<li><a href="#orgd0c2c9e"><span class="done test">test</span> path:full?</a></li>
</ul>
</li>
<li><a href="#org77605be">poi</a>
<ul>
<li><a href="#org48f8bcd"><span class="todo _">記</span> </a></li>
<li><a href="#orgad4e8a6"><span class="todo note">note</span> </a></li>
<li><a href="#orge444ec3"><b>poi-directory</b></a></li>
<li><a href="#org2f42a30">poi:find</a></li>
<li><a href="#orgf51c0d2">poi:add</a></li>
<li><a href="#org9a39b5">poi:sub</a></li>
<li><a href="#org13c11cf">poi:up</a></li>
<li><a href="#orgd86f244">poi:list</a></li>
<li><a href="#org23a8903">poi:help</a></li>
<li><a href="#org120b9dc"><span class="done test">test</span> </a></li>
</ul>
</li>
<li><a href="#org8f6adeb">word-interpreter-syntax:path</a>
<ul>
<li><a href="#org9f6a099"><del>word</del>?</a></li>
<li><a href="#org73fc213"><del>word</del>-&gt;word</a></li>
<li><a href="#org8589d63"><span class="done test">test</span> </a></li>
<li><a href="#orga8a67ca"><span class="todo note">note</span> </a></li>
<li><a href="#orgda2207d"><span class="todo note">note</span> format</a></li>
<li><a href="#org6fc106a">path-syntax-word-&gt;path</a></li>
<li><a href="#orgc10b36a">word-interpreter-syntax:path</a></li>
<li><a href="#org5aa2e58">more,syntax-rule-set:basic-REPL</a></li>
<li><a href="#orgefab73b"><span class="done test">test</span> </a></li>
</ul>
</li>
<li><a href="#org24b350">string</a>
<ul>
<li><a href="#orged13bbe">string:full-of-the-same-byte?</a></li>
<li><a href="#org4b9fd18"><span class="done test">test</span> string:full-of-the-same-byte?</a></li>
<li><a href="#org3ee711">string:any-word</a></li>
<li><a href="#org92f7859">string:every-word</a></li>
<li><a href="#orgc60bb49"><span class="done test">test</span> string:every-word</a></li>
<li><a href="#orgc8d9b3">string:word-end-back</a></li>
<li><a href="#org4c7655b">string:word-begin-back</a></li>
<li><a href="#orge1faa5a">string:word-back</a></li>
<li><a href="#orgd4adaa3"><span class="done test">test</span> string:word-back</a></li>
</ul>
</li>
<li><a href="#org27388bd">reading-stack</a>
<ul>
<li><a href="#org7e4ec87">unread-word</a></li>
<li><a href="#orgbc5aeff"><span class="done test">test</span> </a></li>
</ul>
</li>
<li><a href="#orgf03c0d2"><span class="todo _">記</span> 模塊</a>
<ul>
<li><a href="#org9daa0c0">元數據 之 語法</a></li>
<li><a href="#org7e3ff4a">減載</a></li>
<li><a href="#org6b25df9">加載棧</a></li>
<li><a href="#org8096acd">模塊命名棧 與 全局命名棧</a></li>
<li><a href="#org7cd7bc1">模塊與文件一一對應</a></li>
<li><a href="#org86d2dbf">循環引入</a></li>
</ul>
</li>
<li><a href="#orgc2f0790">module-naming-stack</a>
<ul>
<li><a href="#org3877aa4"><span class="todo note">note</span> module-naming-stack</a></li>
<li><a href="#orgb7f58fe"><span class="todo note">note</span> name-record</a></li>
<li><a href="#orge8c5c27"><b>module-naming-stack</b></a></li>
</ul>
</li>
<li><a href="#org6c5c205">moi</a>
<ul>
<li><a href="#orgb4a61d5"><span class="todo note">note</span> </a></li>
<li><a href="#org49bcb9d"><b>module-directory</b></a></li>
<li><a href="#org9a831ee">moi:find</a></li>
<li><a href="#org6107b66">moi:add</a></li>
<li><a href="#org6813736">moi:sub</a></li>
<li><a href="#org3b58c87">moi:up</a></li>
<li><a href="#org6eb2cba">moi:list</a></li>
<li><a href="#orga1f7d71">moi:help</a></li>
<li><a href="#org6dfaac6"><span class="done test">test</span> </a></li>
</ul>
</li>
<li><a href="#org2679354">module-stack &amp; module-info</a>
<ul>
<li><a href="#orgbe0f348"><span class="todo _">記</span> 用法</a></li>
<li><a href="#org730b5f3"><b>module-stack</b></a></li>
<li><a href="#orgc17a60b"><span class="todo note">note</span> &lt;module-info&gt;</a></li>
<li><a href="#org96b8127">module-</a></li>
<li><a href="#orgd8d9843">module-</a></li>
<li><a href="#orgcf169a0">module-</a></li>
<li><a href="#org1ce750d">module-</a></li>
<li><a href="#orgce75b5c">module-</a></li>
<li><a href="#orge477951">module-</a></li>
<li><a href="#org7fa7b71">module-</a></li>
<li><a href="#org8e9af70">module-stack:find</a></li>
</ul>
</li>
<li><a href="#orga51c27d">importing-stack &amp; importing-record</a>
<ul>
<li><a href="#org8a303dc"><span class="todo _">記</span> 用法</a></li>
<li><a href="#orgc5fd998"><b>importing-stack</b> &amp; <b>testing-flag</b></a></li>
<li><a href="#org6c361b3"><span class="todo note">note</span> &lt;importing-record&gt;</a></li>
<li><a href="#orgd817a4b">importing-record:[get|set]-name</a></li>
<li><a href="#org2d48320">importing-record:[get|set]-testing-flag</a></li>
<li><a href="#org502de20">importing-stack:find</a></li>
<li><a href="#orgf0b7553">importing-stack:drop</a></li>
<li><a href="#orgbb625db">t</a></li>
</ul>
</li>
<li><a href="#org41245ba">global-naming-stack &amp; module-naming-stack</a>
<ul>
<li><a href="#org8dbc3f9">---------------------------------</a></li>
<li><a href="#org6952966"><span class="todo _">記</span> 接口</a></li>
<li><a href="#orgc5c7330">---------------------------------</a></li>
<li><a href="#org8e874a1">module-naming-stack:record-jo</a></li>
<li><a href="#org5bdaada">module-naming-stack:delete-last-record</a></li>
<li><a href="#org1dee994">---------------------------------</a></li>
<li><a href="#orga021c96">global-naming-stack:clear-naming</a></li>
<li><a href="#org6cda8dc">module-naming-stack:clear-naming</a></li>
<li><a href="#org2354d9d">---------------------------------</a></li>
<li><a href="#orgda632ae">global-naming-stack:prefix-naming</a></li>
<li><a href="#orgd9015ba">module-naming-stack:expose-naming</a></li>
<li><a href="#orgaa6de66">---------------------------------</a></li>
</ul>
</li>
<li><a href="#orgd66e866">undo</a>
<ul>
<li><a href="#org5fc022f"><span class="todo _">記</span> 撤銷</a></li>
<li><a href="#orga5ddb88"><span class="todo note">note</span> global states</a></li>
<li><a href="#org1966a6c"><b>undo-stack</b></a></li>
<li><a href="#org2e293d8"><span class="todo note">note</span> undo-point</a></li>
<li><a href="#org74c7943">interface of &lt;undo-point&gt;</a>
<ul>
<li><a href="#orgd9af82">undo-point:[get|set]-jojo-area</a></li>
<li><a href="#org629b7db">undo-point:[get|set]-string-area</a></li>
<li><a href="#org101e1af">undo-point:[get|set]-global-naming-stack</a></li>
<li><a href="#org9f10d93">undo-point:[get|set]-module-naming-stack</a></li>
<li><a href="#org1242cfa">undo-point:[get|set]-syntax-backup-area</a></li>
<li><a href="#org94ed01c">undo-point:[get|set]-number-of-syntax-rule-sets</a></li>
<li><a href="#org3986d33">undo-point:[get|set]-importing-stack</a></li>
</ul>
</li>
<li><a href="#orgfb8555"><b>syntax-backup-area</b></a></li>
<li><a href="#org80b8c21">undo-point:create</a>
<ul>
<li><a href="#orgc8387ee"><span class="todo _">記</span> </a></li>
<li><a href="#org5a3c6bf">undo-point:create,copy-syntax,one-syntax-rule-set</a></li>
<li><a href="#orgc7c0cce">undo-point:create,copy-syntax</a></li>
<li><a href="#org71e79be">undo-point:create</a></li>
</ul>
</li>
<li><a href="#orgbe48b1f">undo-point:restore</a>
<ul>
<li><a href="#org813bc8">undo-point:restore-jojo-area</a></li>
<li><a href="#org5a57edb">undo-point:restore-string-area</a></li>
<li><a href="#org2570a7">undo-point:restore-global-naming-stack</a></li>
<li><a href="#org85a10e4">undo-point:restore-module-naming-stack</a></li>
<li><a href="#org71c3886"><span class="todo _">記</span> 語法棧的備份</a></li>
<li><a href="#org64f78ec">undo-point:restore-syntax-backup-area,set-syntax</a></li>
<li><a href="#org57205d7">undo-point:restore-syntax-backup-area</a></li>
<li><a href="#org87b7676">undo-point:restore-importing-stack</a></li>
<li><a href="#org7b3bc23">undo-point:restore-undo-stack</a></li>
</ul>
</li>
<li><a href="#orgb01cb63">undo</a></li>
<li><a href="#org90369ff"><span class="done test">test</span> undo</a></li>
<li><a href="#orgc72b573"><span class="done test">test</span> undo with syntax-stack</a></li>
<li><a href="#orgb0acceb"><span class="done test">test</span> undo with alias</a></li>
</ul>
</li>
<li><a href="#org91c871">pre-module:*syntax-rule-set*</a></li>
<li><a href="#orgdff477c">syntax-rule-set:*post-module*</a></li>
<li><a href="#org1ec4770">module-buffer</a>
<ul>
<li><a href="#org41d1f98">module-meta-begin-word?</a></li>
<li><a href="#org4af681f">module-meta-end-word?</a></li>
<li><a href="#orga9c46c1">module-meta-word?</a></li>
<li><a href="#org55e53c2"><span class="done test">test</span> module-meta-begin-word? &amp; module-meta-begin-word?</a></li>
<li><a href="#org5d143e5"><span class="todo _">記</span> 謂詞</a></li>
<li><a href="#org34de985">module-buffer:good-format?</a></li>
<li><a href="#org48221ff"><span class="done test">test</span> module-buffer:good-format?</a></li>
<li><a href="#org44b0a83">module-buffer:get-code-string</a></li>
<li><a href="#orgafdf496">module-buffer:get-meta-string</a></li>
<li><a href="#org14996ae"><span class="done test">test</span> module-buffer:get-meta-string</a></li>
</ul>
</li>
<li><a href="#orgfa46929">import &amp; load &amp; load-with-test</a>
<ul>
<li><a href="#orgc872185"><span class="todo _">記</span> 避免相互遞歸函數</a></li>
<li><a href="#org4b00194">name-&gt;module-prefix</a></li>
<li><a href="#org72a552c">import</a></li>
<li><a href="#org472c71f">module-syntax:unknow-meta-word</a></li>
<li><a href="#orgace5e41">pre-module-syntax</a>
<ul>
<li><a href="#orgb346de0">meta-literal-word:import?</a></li>
<li><a href="#orgf89e72">pre-module-syntax:import</a></li>
<li><a href="#org4671237">add syntax-rule</a></li>
</ul>
</li>
<li><a href="#orgd17520e">post-module-syntax</a>
<ul>
<li><a href="#org20f43e9">meta-literal-word:do?</a></li>
<li><a href="#orgb09b521">post-module-syntax:do</a></li>
<li><a href="#orgaf49fd3">add syntax-rule</a></li>
</ul>
</li>
<li><a href="#org939aad5"><span class="done test">test</span> </a></li>
<li><a href="#org56cd4b1">load</a></li>
<li><a href="#orgbd8e17e"><span class="done test">test</span> </a></li>
<li><a href="#orga5e52e7">load-with-test</a></li>
<li><a href="#org2bd074e"><span class="done test">test</span> -function</a></li>
<li><a href="#org769c6e2"><span class="done test">test</span> -variable</a></li>
<li><a href="#org24e2666"><span class="done test">test</span> -variable,with-tos</a></li>
<li><a href="#org38ef38e"><span class="done test">test</span> -do</a></li>
<li><a href="#org261c405">the function test</a></li>
<li><a href="#org897a809"><span class="done test">test</span> </a></li>
<li><a href="#orgec9f732"><span class="done test">test</span> with gamber</a></li>
</ul>
</li>
<li><a href="#orgff50378">type</a></li>
<li><a href="#orgb5a0942">report</a>
<ul>
<li><a href="#org79d0ae1">report:memory</a></li>
<li><a href="#orgbf12514">report:syntax</a></li>
<li><a href="#org2432754">global-naming-stack:list-by-jo-predicate</a></li>
<li><a href="#orgd6c5b29">report:global-naming-stack</a></li>
<li><a href="#org7cd8611">report:system</a></li>
</ul>
</li>
<li><a href="#org6366930">hi</a></li>
<li><a href="#org7c3e768">help</a></li>
<li><a href="#org7171480">command line interface</a>
<ul>
<li><a href="#orgf4a57fa">command-function:unknow-function</a></li>
<li><a href="#org9e988f5">command-function:stack-REPL</a></li>
<li><a href="#org27907c5">command-function:basic-REPL</a></li>
<li><a href="#org54f0c97">command-function:poi</a></li>
<li><a href="#org74c076e">command-function:moi</a></li>
<li><a href="#orga720b3a">command-function:load</a></li>
<li><a href="#org56a2b43">command-function:load-with-test</a></li>
<li><a href="#org33a0ed9">command-function:no-function</a></li>
<li><a href="#org9899296">command:dispatch</a></li>
</ul>
</li>
<li><a href="#orgc906ee1"><b>the story begin</b></a></li>
<li><a href="#org7566498"><span class="done test">test</span> </a></li>
</ul>
</div>
</div>

<div id="outline-container-org83a85fb" class="outline-2">
<h2 id="org83a85fb"><span class="done todo">todo</span> </h2>
<div class="outline-text-2" id="text-org83a85fb">
</div><div id="outline-container-org17c6098" class="outline-3">
<h3 id="org17c6098"><span class="todo _gt__lt_">&gt;&lt;</span> code generation for interfaces of data-structure</h3>
</div>

<div id="outline-container-org3bab054" class="outline-3">
<h3 id="org3bab054"><span class="todo _gt__lt_">&gt;&lt;</span> the size of file</h3>
</div>

<div id="outline-container-org2ddc6aa" class="outline-3">
<h3 id="org2ddc6aa"><span class="todo _gt__lt_">&gt;&lt;</span> better structure for IO functions</h3>
<div class="outline-text-3" id="text-org2ddc6aa">
<ul class="org-ul">
<li><p>only one error-code-&gt;string is not enough</p></li></ul>
</div>
</div>

<div id="outline-container-org332885a" class="outline-3">
<h3 id="org332885a"><span class="todo _gt__lt_">&gt;&lt;</span> write-with-color</h3>
<div class="outline-text-3" id="text-org332885a">
<ul class="org-ul">
<li><p>for better report</p></li></ul>
</div>
</div>

<div id="outline-container-orge76e229" class="outline-3">
<h3 id="orge76e229">type check</h3>
</div>

<div id="outline-container-orgb37ea38" class="outline-3">
<h3 id="orgb37ea38"><span class="todo _gt__lt_">&gt;&lt;</span> view the core as a special module</h3>
<div class="outline-text-3" id="text-orgb37ea38">
<ul class="org-ul">
<li><p>re-import core every time</p></li></ul>
</div>
</div>

<div id="outline-container-orgfe64a08" class="outline-3">
<h3 id="orgfe64a08">optimize with type info</h3>
</div>

<div id="outline-container-org1d9ccae" class="outline-3">
<h3 id="org1d9ccae">fast tangle</h3>
</div>

<div id="outline-container-org5cac4b4" class="outline-3">
<h3 id="org5cac4b4">debug-REPL</h3>
</div>

<div id="outline-container-org7dfa45b" class="outline-3">
<h3 id="org7dfa45b">漢語 alias</h3>
</div>

<div id="outline-container-orge6cd90" class="outline-3">
<h3 id="orge6cd90">language-level support for creating and managing processes</h3>
</div>
</div>


<div id="outline-container-orgcf3cebb" class="outline-2">
<h2 id="orgcf3cebb">module-meta</h2>
<div class="outline-text-2" id="text-orgcf3cebb">
</div><div id="outline-container-orge4a4c27" class="outline-3">
<h3 id="orge4a4c27">core-test</h3>
<div class="outline-text-3" id="text-orge4a4c27">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ef5939; font-weight: bold;">::::::::</span>
<span style="color: #a6e22e; font-weight: bold;">author:</span> XIE Yuheng
<span style="color: #a6e22e; font-weight: bold;">do:</span> <span style="color: #e6db74;">"* (core-test) finished"</span> .s .l
<span style="color: #ae81ff; font-weight: bold;">========</span>
</pre>
</div>
</div>
</div>
</div>


<div id="outline-container-org68161fb" class="outline-2">
<h2 id="org68161fb">writers</h2>
<div class="outline-text-2" id="text-org68161fb">
</div><div id="outline-container-org72c523a" class="outline-3">
<h3 id="org72c523a"><span class="todo note">note</span> name of writers</h3>
<div class="outline-text-3" id="text-org72c523a">
<ul class="org-ul">
<li><p>the use of "." as prefix</p><p>is inherited from Forth</p></li>
<li><p><p></p><p>table</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">.</td></p><p><td class="org-left">pretty_write_integer</td></p><p><td class="org-left">assembly</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">.i</td></p><p><td class="org-left">write_integer</td></p><p><td class="org-left">core</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">.s</td></p><p><td class="org-left">write_string</td></p><p><td class="org-left">assembly</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">.l</td></p><p><td class="org-left">linefeed</td></p><p><td class="org-left">core</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">.b</td></p><p><td class="org-left">write-byte</td></p><p><td class="org-left">&#xa0;</td></p><p></tr></p><p></tbody></p><p></table></p></li></ul>
</div>
</div>

<div id="outline-container-org80a12e7" class="outline-3">
<h3 id="org80a12e7">.l .i .b</h3>
<div class="outline-text-3" id="text-org80a12e7">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">.l</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">10</span> write-byte
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">.i</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  write-integer
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">.b</span>
  <span style="color: #FF8888;">&lt;&lt; byte -- &gt;&gt;</span>
  write-byte
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgbb44077" class="outline-2">
<h2 id="orgbb44077">jojo-compiler-syntax</h2>
<div class="outline-text-2" id="text-orgbb44077">
</div><div id="outline-container-orgd888f7" class="outline-3">
<h3 id="orgd888f7"><span class="todo _">記</span> 條件轉跳</h3>
<div class="outline-text-3" id="text-orgd888f7">
<ul class="org-ul">
<li><p>one predicate can make two branchs</p><p>three predicates can make four branchs</p><p>three predicates may only make three branchs</p><p>but indeed there must be an invisible branch</p></li></ul>
</div>
</div>

<div id="outline-container-org1eebd3a" class="outline-3">
<h3 id="org1eebd3a">literal-word:[if|else|then]?</h3>
<div class="outline-text-3" id="text-org1eebd3a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">literal-word:if?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  <span style="color: #e6db74;">"if"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">literal-word:else?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  <span style="color: #e6db74;">"else"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">literal-word:then?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  <span style="color: #e6db74;">"then"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4d643bd" class="outline-3">
<h3 id="org4d643bd">jojo-compiler-syntax:if</h3>
<div class="outline-text-3" id="text-org4d643bd">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:if</span>
  <span style="color: #FF8888;">&lt;&lt; jo, string[address, length], literal-word:if --</span>
<span style="color: #FF8888;">     address, jo, string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">instruction,false?</span>branch
    jojo-area,stay
  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span> xxx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x
  <span style="color: #fd971f; font-weight: bold;">0</span> jojo-area,stay
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org674cedd" class="outline-3">
<h3 id="org674cedd">jojo-compiler-syntax:else</h3>
<div class="outline-text-3" id="text-org674cedd">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:else</span>
  <span style="color: #FF8888;">&lt;&lt; address, jo, string[address, length], literal-word:else --</span>
<span style="color: #FF8888;">     address, jo, string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #f92672; font-weight: bold;">jo</span> instruction,branch
     jojo-area,stay
  x<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>xxx
  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span> xxxx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x
  <span style="color: #fd971f; font-weight: bold;">0</span> jojo-area,stay
  <span style="color: #FF8888;">&lt;&lt; address, string[address, length], address &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
  over sub <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div
  swap set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2b4a489" class="outline-3">
<h3 id="org2b4a489">jojo-compiler-syntax:then</h3>
<div class="outline-text-3" id="text-org2b4a489">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:then</span>
  <span style="color: #FF8888;">&lt;&lt; address, jo, string[address, length], literal-word:then --</span>
<span style="color: #FF8888;">     jo, string[address, length] &gt;&gt;</span>
  drop2
  x<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>xxx
  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
  over sub <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div
  swap set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4175bd9" class="outline-3">
<h3 id="org4175bd9"><span class="done test">test</span> if &amp; else &amp; then</h3>
<div class="outline-text-3" id="text-org4175bd9">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">.12</span>
  <span style="color: #FF8888;">&lt;&lt; 1 2 -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"(^-^)"</span> .s
    <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #e6db74;">"\^o^/"</span> .s
    <span style="color: #f92672; font-weight: bold;">else</span>
      <span style="color: #e6db74;">"_____"</span> .s
    <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"_____"</span> .s
    <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #e6db74;">"\^o^/"</span> .s
    <span style="color: #f92672; font-weight: bold;">else</span>
      <span style="color: #e6db74;">"_____"</span> .s
    <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) nested if &amp; else &amp; then"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">2</span> .12 .l
  <span style="color: #fd971f; font-weight: bold;">6</span> <span style="color: #fd971f; font-weight: bold;">2</span> .12 .l
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">6</span> .12 .l
  <span style="color: #fd971f; font-weight: bold;">6</span> <span style="color: #fd971f; font-weight: bold;">6</span> .12 .l
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org30090f" class="outline-3">
<h3 id="org30090f"><span class="done test">test</span> if &amp; else &amp; then by factorial</h3>
<div class="outline-text-3" id="text-org30090f">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">factorial</span>
  <span style="color: #FF8888;">&lt;&lt; number -- number &gt;&gt;</span>
  dup
  <span style="color: #ffffff; font-weight: bold;">one?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup sub1 factorial
  mul
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) if &amp; else &amp; then by factorial"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">1</span> factorial <span style="color: #fd971f; font-weight: bold;">1</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> factorial <span style="color: #fd971f; font-weight: bold;">2</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">3</span> factorial <span style="color: #fd971f; font-weight: bold;">6</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">4</span> factorial <span style="color: #fd971f; font-weight: bold;">24</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">5</span> factorial <span style="color: #fd971f; font-weight: bold;">120</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">6</span> factorial <span style="color: #fd971f; font-weight: bold;">720</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd113d2e" class="outline-3">
<h3 id="orgd113d2e">literal-word:loop?</h3>
<div class="outline-text-3" id="text-orgd113d2e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">literal-word:loop?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  <span style="color: #e6db74;">"loop"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb2aa0f5" class="outline-3">
<h3 id="orgb2aa0f5">jojo-compiler-syntax:loop</h3>
<div class="outline-text-3" id="text-orgb2aa0f5">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:loop</span>
  <span style="color: #FF8888;">&lt;&lt; jo, string[address, length], literal-word:loop --</span>
<span style="color: #FF8888;">     jo, string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #00ffff; font-weight: bold;">tail-call</span>
    jojo-area,stay
  x<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>xx
    jojo-area,stay
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5ee893" class="outline-3">
<h3 id="org5ee893">literal-word:recur?</h3>
<div class="outline-text-3" id="text-org5ee893">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">literal-word:recur?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  <span style="color: #e6db74;">"recur"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org17ee00d" class="outline-3">
<h3 id="org17ee00d">jojo-compiler-syntax:recur</h3>
<div class="outline-text-3" id="text-org17ee00d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:recur</span>
  <span style="color: #FF8888;">&lt;&lt; jo, string[address, length], literal-word:recur --</span>
<span style="color: #FF8888;">     jo, string[address, length] &gt;&gt;</span>
  drop2
  x<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>xx
    jojo-area,stay
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org260849e" class="outline-3">
<h3 id="org260849e"><span class="done test">test</span> loop &amp; recur by factorial</h3>
<div class="outline-text-3" id="text-org260849e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">recur-factorial</span>
  <span style="color: #FF8888;">&lt;&lt; number -- number &gt;&gt;</span>
  dup
  <span style="color: #ffffff; font-weight: bold;">one?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup sub1 <span style="color: #f92672; font-weight: bold;">recur</span> mul
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) recur by factorial"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">1</span> recur-factorial <span style="color: #fd971f; font-weight: bold;">1</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> recur-factorial <span style="color: #fd971f; font-weight: bold;">2</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">3</span> recur-factorial <span style="color: #fd971f; font-weight: bold;">6</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">4</span> recur-factorial <span style="color: #fd971f; font-weight: bold;">24</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">5</span> recur-factorial <span style="color: #fd971f; font-weight: bold;">120</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">6</span> recur-factorial <span style="color: #fd971f; font-weight: bold;">720</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">loop-factorial,loop</span>
  <span style="color: #FF8888;">&lt;&lt; counter, product -- product &gt;&gt;</span>
  over <span style="color: #ffffff; font-weight: bold;">one?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    swap drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  over mul
  swap sub1 swap
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">loop-factorial</span>
  <span style="color: #FF8888;">&lt;&lt; number -- number &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> loop-factorial,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) loop by factorial"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">1</span> loop-factorial <span style="color: #fd971f; font-weight: bold;">1</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> loop-factorial <span style="color: #fd971f; font-weight: bold;">2</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">3</span> loop-factorial <span style="color: #fd971f; font-weight: bold;">6</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">4</span> loop-factorial <span style="color: #fd971f; font-weight: bold;">24</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">5</span> loop-factorial <span style="color: #fd971f; font-weight: bold;">120</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">6</span> loop-factorial <span style="color: #fd971f; font-weight: bold;">720</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgca0139d" class="outline-3">
<h3 id="orgca0139d"><span class="done test">test</span> recur by fibonacci</h3>
<div class="outline-text-3" id="text-orgca0139d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #FF8888;">&lt;&lt; 0 1 1 2 3 5 8 13 21 34 55 89 144 233 &gt;&gt;</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">fibonacci</span>
  <span style="color: #FF8888;">&lt;&lt; number -- number &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #ffffff; font-weight: bold;">one?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup sub1 <span style="color: #f92672; font-weight: bold;">recur</span>
  swap sub1 sub1 <span style="color: #f92672; font-weight: bold;">recur</span>
  add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* test recur by fibonacci"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">0</span>  fibonacci <span style="color: #fd971f; font-weight: bold;">0</span>    <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #fd971f; font-weight: bold;">1</span>  fibonacci <span style="color: #fd971f; font-weight: bold;">1</span>    <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">2</span>  fibonacci <span style="color: #fd971f; font-weight: bold;">1</span>    <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">3</span>  fibonacci <span style="color: #fd971f; font-weight: bold;">2</span>    <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">4</span>  fibonacci <span style="color: #fd971f; font-weight: bold;">3</span>    <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">5</span>  fibonacci <span style="color: #fd971f; font-weight: bold;">5</span>    <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">6</span>  fibonacci <span style="color: #fd971f; font-weight: bold;">8</span>    <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">7</span>  fibonacci <span style="color: #fd971f; font-weight: bold;">13</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">8</span>  fibonacci <span style="color: #fd971f; font-weight: bold;">21</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">9</span>  fibonacci <span style="color: #fd971f; font-weight: bold;">34</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">10</span> fibonacci <span style="color: #fd971f; font-weight: bold;">55</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">11</span> fibonacci <span style="color: #fd971f; font-weight: bold;">89</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">12</span> fibonacci <span style="color: #fd971f; font-weight: bold;">144</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">13</span> fibonacci <span style="color: #fd971f; font-weight: bold;">233</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">14</span> fibonacci <span style="color: #fd971f; font-weight: bold;">377</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">15</span> fibonacci <span style="color: #fd971f; font-weight: bold;">610</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">16</span> fibonacci <span style="color: #fd971f; font-weight: bold;">987</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">17</span> fibonacci <span style="color: #fd971f; font-weight: bold;">1597</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">18</span> fibonacci <span style="color: #fd971f; font-weight: bold;">2584</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">19</span> fibonacci <span style="color: #fd971f; font-weight: bold;">4181</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">20</span> fibonacci <span style="color: #fd971f; font-weight: bold;">6765</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orge1ff5f1" class="outline-3">
<h3 id="orge1ff5f1">more,syntax-rule-set:jojo-compiler</h3>
<div class="outline-text-3" id="text-orge1ff5f1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">more,syntax-rule-set:jojo-compiler</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">jojo-compiler:*syntax-rule-set*</span>
  dup <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>if?    <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>if    <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  dup <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>else?  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>else  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  dup <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>then?  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>then  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  dup <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>loop?  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>loop  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
      <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>recur? <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>recur <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
<span style="color: #ffffff; font-weight: bold;">more,syntax-rule-set:</span>jojo-compiler
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org8332aff" class="outline-2">
<h2 id="org8332aff">name &amp; name-hash-table</h2>
<div class="outline-text-2" id="text-org8332aff">
</div><div id="outline-container-orgc6ec085" class="outline-3">
<h3 id="orgc6ec085"><span class="todo note">note</span> </h3>
<div class="outline-text-3" id="text-orgc6ec085">
<ul class="org-ul">
<li><p>the name-hash-table</p><p>is used both in cicada-nymph and cicada-language</p></li></ul>
</div>
</div>

<div id="outline-container-orgfd018c6" class="outline-3">
<h3 id="orgfd018c6">allocate</h3>
<div class="outline-text-3" id="text-orgfd018c6">
</div><div id="outline-container-org34028a2" class="outline-4">
<h4 id="org34028a2"><span class="todo note">note</span> </h4>
<div class="outline-text-4" id="text-org34028a2">
<ul class="org-ul">
<li><p>an interface of <b>un-initialized-memory</b></p></li></ul>
</div>
</div>

<div id="outline-container-orgd3dd883" class="outline-4">
<h4 id="orgd3dd883">allocate-memory</h4>
<div class="outline-text-4" id="text-orgd3dd883">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">allocate-memory</span>
  <span style="color: #FF8888;">&lt;&lt; size -- address &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">*un-initialized-memory,current-free-address*</span> clear-memory
  <span style="color: #fd971f; font-weight: bold;">*un-initialized-memory,current-free-address*</span> swap <span style="color: #FF8888;">&lt;&lt; address as return value &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*un-initialized-memory,current-free-address*</span> add-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org57e407d" class="outline-3">
<h3 id="org57e407d"><b>name-hash-table</b></h3>
<div class="outline-text-3" id="text-org57e407d">
<ul class="org-ul">
<li><p>the following are some prime number</p><p>ready to be used</p><p><ul class="org-ul"></p><p><li><p>1000003   about 976 k</p></li></p><p><li><p>1000033</p></li></p><p><li><p>1000333</p></li></p><p><li><p>100003    about 97 k</p></li></p><p><li><p>100333</p></li></p><p><li><p>997</p></li></p><p><li><p>499</p></li></ul></p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">100333</span>
<span style="color: #FF8888;">&lt;&lt; drop 13 &gt;&gt;</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*name-hash-table,size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">5</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*name-hash-table,unit*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*name-hash-table,size*</span>
<span style="color: #fd971f; font-weight: bold;">*name-hash-table,unit*</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*name-hash-table*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">0</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*name-hash-table,counter*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc8dfe12" class="outline-3">
<h3 id="orgc8dfe12"><b>name-hash-table,string-area</b></h3>
<div class="outline-text-3" id="text-orgc8dfe12">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">*name-hash-table,size*</span> <span style="color: #fd971f; font-weight: bold;">32</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*name-hash-table,string-area,size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*name-hash-table,string-area,size*</span>
<span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*name-hash-table,string-area*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*name-hash-table,string-area*</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*name-hash-table,string-area,current-free-address*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org8a196a1" class="outline-3">
<h3 id="org8a196a1">name-hash-table,string-area,stay</h3>
<div class="outline-text-3" id="text-org8a196a1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,string-area,stay</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- &gt;&gt;</span>
  tuck
  <span style="color: #fd971f; font-weight: bold;">*name-hash-table,string-area,current-free-address*</span>
  string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*name-hash-table,string-area,current-free-address*</span>
  add-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org89a397b" class="outline-3">
<h3 id="org89a397b">make-string,for-name</h3>
<div class="outline-text-3" id="text-org89a397b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">make-string,for-name</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- string-copy[address, length] &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*name-hash-table,string-area,current-free-address*</span>
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x
  tuck
  name-hash-table,string-area,stay
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf15a08" class="outline-3">
<h3 id="orgf15a08">name</h3>
<div class="outline-text-3" id="text-orgf15a08">
</div><div id="outline-container-org202245c" class="outline-4">
<h4 id="org202245c"><span class="todo note">note</span> </h4>
<div class="outline-text-4" id="text-org202245c">
<ul class="org-ul">
<li><p>a name is an index into name-hash-table</p></li>
<li><p>an entry can be viewed</p><p><ol class="org-ol"></p><p><li>as a point</li></p><p><li>as an orbit</li></ol></p></li>
<li><p><p></p><p>in a name entry we have the following fields</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><thead></p><p><tr></p><p><th scope="col" class="org-left">name</th></p><p><th scope="col" class="org-left">name-string-address</th></p><p></tr></p><p></p><p><tr></p><p><th scope="col" class="org-left">&#xa0;</th></p><p><th scope="col" class="org-left">name-string-length</th></p><p></tr></p><p></thead></p><p><tbody></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">orbit-length</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">orbiton</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">jo</td></p><p></tr></p><p></tbody></p><p></table></p><p><ol class="org-ol"></p><p><li>name-string-address</p><p>0 denotes name not used</li></p><p><li>orbit-length</p><p>as an orbit</p><p>its length gets updated</li></p><p><li>as a point</p><p>it is on an orbit</li></p><p><li>jo</p><p>0 denotes name not used as jo</li></ol></p></li></ul>
</div>
</div>

<div id="outline-container-org2646ced" class="outline-4">
<h4 id="org2646ced">name-&gt;address</h4>
<div class="outline-text-4" id="text-org2646ced">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-&gt;address</span>
  <span style="color: #FF8888;">&lt;&lt; name -- address &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*name-hash-table,unit*</span> mul
  <span style="color: #fd971f; font-weight: bold;">*name-hash-table*</span> add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org1d5f41b" class="outline-4">
<h4 id="org1d5f41b">name,used?</h4>
<div class="outline-text-4" id="text-org1d5f41b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name,used?</span>
  <span style="color: #FF8888;">&lt;&lt; name -- bool &gt;&gt;</span>
  name<span style="color: #b0b1a3;">-&gt;</span>address
  get <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #ffffff; font-weight: bold;">false?</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgcc8d3fc" class="outline-4">
<h4 id="orgcc8d3fc">name,used-as-jo?</h4>
<div class="outline-text-4" id="text-orgcc8d3fc">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name,used-as-jo?</span>
  <span style="color: #FF8888;">&lt;&lt; name -- bool &gt;&gt;</span>
  name<span style="color: #b0b1a3;">-&gt;</span>address
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> mul add
  get <span style="color: #ffffff; font-weight: bold;">zero?</span> not
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd532a89" class="outline-4">
<h4 id="orgd532a89">name-&gt;string</h4>
<div class="outline-text-4" id="text-orgd532a89">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-&gt;string</span>
  <span style="color: #FF8888;">&lt;&lt; name -- string[address, length] &gt;&gt;</span>
  name<span style="color: #b0b1a3;">-&gt;</span>address
  <span style="color: #fd971f; font-weight: bold;">2</span> n-get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf209914" class="outline-4">
<h4 id="orgf209914">name,get-orbit-length</h4>
<div class="outline-text-4" id="text-orgf209914">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name,get-orbit-length</span>
  <span style="color: #FF8888;">&lt;&lt; name -- orbit-length &gt;&gt;</span>
  name<span style="color: #b0b1a3;">-&gt;</span>address
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org781e4a1" class="outline-4">
<h4 id="org781e4a1">name,get-orbiton</h4>
<div class="outline-text-4" id="text-org781e4a1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name,get-orbiton</span>
  <span style="color: #FF8888;">&lt;&lt; name -- orbiton &gt;&gt;</span>
  name<span style="color: #b0b1a3;">-&gt;</span>address
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">3</span> mul add
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org54d7730" class="outline-4">
<h4 id="org54d7730">name,get-jo</h4>
<div class="outline-text-4" id="text-org54d7730">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name,get-jo</span>
  <span style="color: #FF8888;">&lt;&lt; name -- jo &gt;&gt;</span>
  name<span style="color: #b0b1a3;">-&gt;</span>address
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> mul add
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgdc09171" class="outline-4">
<h4 id="orgdc09171">name,set-string</h4>
<div class="outline-text-4" id="text-orgdc09171">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name,set-string</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], name -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>
  make-string,for-name
  <span style="color: #83EA83; font-weight: bold;">:name</span> name<span style="color: #b0b1a3;">-&gt;</span>address
  <span style="color: #fd971f; font-weight: bold;">2</span> n-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4553191" class="outline-4">
<h4 id="org4553191">name,set-orbit-length</h4>
<div class="outline-text-4" id="text-org4553191">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name,set-orbit-length</span>
  <span style="color: #FF8888;">&lt;&lt; orbit-length, name -- &gt;&gt;</span>
  name<span style="color: #b0b1a3;">-&gt;</span>address
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org21160c9" class="outline-4">
<h4 id="org21160c9">name,set-orbiton</h4>
<div class="outline-text-4" id="text-org21160c9">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name,set-orbiton</span>
  <span style="color: #FF8888;">&lt;&lt; orbiton, name -- &gt;&gt;</span>
  name<span style="color: #b0b1a3;">-&gt;</span>address
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">3</span> mul add
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org40daefd" class="outline-4">
<h4 id="org40daefd">name,set-jo</h4>
<div class="outline-text-4" id="text-org40daefd">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name,set-jo</span>
  <span style="color: #FF8888;">&lt;&lt; jo, name -- &gt;&gt;</span>
  name<span style="color: #b0b1a3;">-&gt;</span>address
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> mul add
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org6834292" class="outline-4">
<h4 id="org6834292">name,no-collision?</h4>
<div class="outline-text-4" id="text-org6834292">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name,no-collision?</span>
  <span style="color: #FF8888;">&lt;&lt; name -- bool &gt;&gt;</span>
  dup name,get-orbiton
  <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org65692b5" class="outline-3">
<h3 id="org65692b5">name-hash-table</h3>
<div class="outline-text-3" id="text-org65692b5">
</div><div id="outline-container-orgd5a5b6c" class="outline-4">
<h4 id="orgd5a5b6c"><span class="todo note">note</span> interface</h4>
<div class="outline-text-4" id="text-orgd5a5b6c">
<ul class="org-ul">
<li><p>open addressing</p><p>for we do not need to delete</p></li>
<li><p>math</p><p><ul class="org-ul"></p><p><li><p>hash</p></li></ul></p></li>
<li><p>memory</p><p><ul class="org-ul"></p><p><li><p>insert</p></li></p><p><li><p>search</p></li></ul></p></li>
<li><p>function</p><p><ul class="org-ul"></p><p><li><p>string-&gt;name</p></li></p><p><li><p>name-&gt;string</p></li></ul></p></li></ul>
</div>
</div>

<div id="outline-container-orgf72290" class="outline-4">
<h4 id="orgf72290">name-hash-table,hash</h4>
<div class="outline-text-4" id="text-orgf72290">
<ul class="org-ul">
<li><p>prime table size</p></li>
<li><p>linear probing</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,hash</span>
  <span style="color: #FF8888;">&lt;&lt; number, counter -- index &gt;&gt;</span>
  add <span style="color: #fd971f; font-weight: bold;">*name-hash-table,size*</span> mod
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org8067df3" class="outline-4">
<h4 id="org8067df3">string-&gt;finite-carry-sum</h4>
<div class="outline-text-4" id="text-org8067df3">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">16</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*max-carry-position*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string-&gt;finite-carry-sum,loop</span>
  <span style="color: #FF8888;">&lt;&lt; carry-sum, string[address, length], counter -- carry-sum &gt;&gt;</span>
  over <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">*max-carry-position*</span> <span style="color: #ffffff; font-weight: bold;">greater-than?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #FF8888;">&lt;&lt; re-start from 0 &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  xx<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>x
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte over
  <span style="color: #fd971f; font-weight: bold;">2</span> swap power
  mul
  x<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>xxxx add xxx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x
  add1 xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte-tail x<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>xx
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string-&gt;finite-carry-sum</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- carry-sum &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x <span style="color: #FF8888;">&lt;&lt; carry-sum &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #FF8888;">&lt;&lt; counter &gt;&gt;</span>
  string<span style="color: #b0b1a3;">-&gt;</span>finite-carry-sum,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orge1bbae" class="outline-4">
<h4 id="orge1bbae">name-hash-table,search</h4>
<div class="outline-text-4" id="text-orge1bbae">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,search,loop</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], number, counter</span>
<span style="color: #FF8888;">     -- name, true</span>
<span style="color: #FF8888;">     -- name, false &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:counter</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:number</span> <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #83EA83; font-weight: bold;">:number</span> <span style="color: #83EA83; font-weight: bold;">:counter</span> name-hash-table,hash
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>
  <span style="color: #83EA83; font-weight: bold;">:number</span> <span style="color: #fd971f; font-weight: bold;">0</span> name-hash-table,hash
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:orbit</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #ffffff; font-weight: bold;">name,used?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span> name<span style="color: #b0b1a3;">-&gt;</span>string
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span> name,get-orbit-length
  <span style="color: #83EA83; font-weight: bold;">:counter</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span>
  <span style="color: #83EA83; font-weight: bold;">:number</span> <span style="color: #83EA83; font-weight: bold;">:counter</span> add1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,search</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length]</span>
<span style="color: #FF8888;">     -- name, true</span>
<span style="color: #FF8888;">     -- name, false &gt;&gt;</span>
  dup2 string<span style="color: #b0b1a3;">-&gt;</span>finite-carry-sum
  <span style="color: #fd971f; font-weight: bold;">0</span> name-hash-table,search,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf441e41" class="outline-4">
<h4 id="orgf441e41">name-hash-table,insert</h4>
<div class="outline-text-4" id="text-orgf441e41">
<ul class="org-ul">
<li><p>I found that (insert) can not re-use (search)</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,insert,loop</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], number, counter</span>
<span style="color: #FF8888;">     -- name, true</span>
<span style="color: #FF8888;">     -- name, false &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:counter</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:number</span> <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #83EA83; font-weight: bold;">:number</span> <span style="color: #83EA83; font-weight: bold;">:counter</span> name-hash-table,hash
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>
  <span style="color: #83EA83; font-weight: bold;">:number</span> <span style="color: #fd971f; font-weight: bold;">0</span> name-hash-table,hash
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:orbit</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #ffffff; font-weight: bold;">name,used?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #83EA83; font-weight: bold;">:name</span>
    name,set-string
    <span style="color: #83EA83; font-weight: bold;">:orbit</span> <span style="color: #83EA83; font-weight: bold;">:name</span>
    name,set-orbiton
    <span style="color: #83EA83; font-weight: bold;">:counter</span> <span style="color: #83EA83; font-weight: bold;">:orbit</span>
    name,set-orbit-length
    <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*name-hash-table,counter*</span> add-set
    <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span> name<span style="color: #b0b1a3;">-&gt;</span>string
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:counter</span> <span style="color: #fd971f; font-weight: bold;">*name-hash-table,size*</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span>
  <span style="color: #83EA83; font-weight: bold;">:number</span>
  <span style="color: #83EA83; font-weight: bold;">:counter</span> add1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,insert</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length]</span>
<span style="color: #FF8888;">     -- name, true</span>
<span style="color: #FF8888;">     -- name, false &gt;&gt;</span>
  dup2 string<span style="color: #b0b1a3;">-&gt;</span>finite-carry-sum
  <span style="color: #fd971f; font-weight: bold;">0</span> name-hash-table,insert,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb0a4a5b" class="outline-4">
<h4 id="orgb0a4a5b">string-&gt;name</h4>
<div class="outline-text-4" id="text-orgb0a4a5b">
<ul class="org-ul">
<li><p>error handling here</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string-&gt;name</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- name &gt;&gt;</span>
  name-hash-table,insert
  <span style="color: #ffffff; font-weight: bold;">false?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (string-&gt;name) *name-hash-table* is full!"</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgdb20f8c" class="outline-4">
<h4 id="orgdb20f8c"><span class="todo note">note</span> about report</h4>
<div class="outline-text-4" id="text-orgdb20f8c">
<ul class="org-ul">
<li><p>report point orbit by orbit</p><p>in the following format</p></li>
<li><p>{index} string # orbit-lenght</p><p><ul class="org-ul"></p><p><li><p>{index} string</p></li></p><p><li><p>{index} string</p></li></p><p><li><p>{index} string</p></li></ul></p></li></ul>
</div>
</div>

<div id="outline-container-orga60ebc4" class="outline-4">
<h4 id="orga60ebc4">name-hash-table,report</h4>
<div class="outline-text-4" id="text-orga60ebc4">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,report,orbit</span>
  <span style="color: #FF8888;">&lt;&lt; name, counter -- &gt;&gt;</span>
  over name,get-orbit-length
  over <span style="color: #ffffff; font-weight: bold;">less-than?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  over name<span style="color: #b0b1a3;">-&gt;</span>string string<span style="color: #b0b1a3;">-&gt;</span>finite-carry-sum
  over name-hash-table,hash
  dup name,get-orbiton
  <span style="color: #FF8888;">&lt;&lt; name, counter, new-name, orbiton &gt;&gt;</span>
  x<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>xxx name<span style="color: #b0b1a3;">-&gt;</span>string string<span style="color: #b0b1a3;">-&gt;</span>finite-carry-sum
  <span style="color: #fd971f; font-weight: bold;">0</span> name-hash-table,hash
  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"  {"</span> .s
    dup write-number
    <span style="color: #e6db74;">"} "</span> .s
    name<span style="color: #b0b1a3;">-&gt;</span>string .s
    .l
  <span style="color: #f92672; font-weight: bold;">else</span>
    drop
  <span style="color: #f92672; font-weight: bold;">then</span>
  add1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,report,loop</span>
  <span style="color: #FF8888;">&lt;&lt; name -- &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">*name-hash-table,size*</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #ffffff; font-weight: bold;">name,used?</span> <span style="color: #f92672; font-weight: bold;">if</span>
  dup <span style="color: #ffffff; font-weight: bold;">name,no-collision?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #FF8888;">&lt;&lt; * {index} string # orbit-lenght &gt;&gt;</span>
    <span style="color: #e6db74;">"* {"</span> .s
    dup write-number
    <span style="color: #e6db74;">"} "</span> .s
    dup name<span style="color: #b0b1a3;">-&gt;</span>string .s
    <span style="color: #e6db74;">" # "</span> .s
    dup name,get-orbit-length
    write-number
    .l
    dup <span style="color: #fd971f; font-weight: bold;">1</span> name-hash-table,report,orbit
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  add1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,report</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> name-hash-table,report,loop
  <span style="color: #e6db74;">"* totally : "</span> .s
  <span style="color: #fd971f; font-weight: bold;">*name-hash-table,counter*</span> write-number
  .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org16668fd" class="outline-4">
<h4 id="org16668fd"><span class="done test">test</span> string-&gt;name &amp; name-&gt;string</h4>
<div class="outline-text-4" id="text-org16668fd">
<ul class="org-ul">
<li><p>set <b>name-hash-table,size</b> to a small number [for example 13]</p><p>then use the following function</p><p>and (name-hash-table,report) to do test</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) string-&gt;name &amp; name-&gt;string"</span> .s .l
  <span style="color: #e6db74;">"a-000"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #e6db74;">"a-111"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"a-222"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"a-333"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"a-444"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"a-555"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"a-666"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"a-777"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"a-888"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"a-999"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"b-000"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"b-111"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"b-222"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"b-333"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"b-444"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"b-555"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"b-666"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"b-777"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"b-888"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and
  <span style="color: #e6db74;">"b-999"</span> dup2 string<span style="color: #b0b1a3;">-&gt;</span>name name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>

<span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">name-hash-table,report</span>
<span style="color: #FF8888;">&gt;&gt;</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb46f2c5" class="outline-4">
<h4 id="orgb46f2c5">name-hash-table,find-jo</h4>
<div class="outline-text-4" id="text-orgb46f2c5">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,find-jo</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length]</span>
<span style="color: #FF8888;">     -- jo, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  name-hash-table,search <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    drop
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #ffffff; font-weight: bold;">name,used-as-jo?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    name,get-jo
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop
  <span style="color: #fd971f; font-weight: bold;">false</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgee9304a" class="outline-4">
<h4 id="orgee9304a"><span class="done test">test</span> name-hash-table,find-jo</h4>
<div class="outline-text-4" id="text-orgee9304a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) name-hash-table,find-jo"</span> .s .l
  <span style="color: #e6db74;">"add"</span> name-hash-table,find-jo <span style="color: #f92672; font-weight: bold;">if</span>
    name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #e6db74;">"add"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #fd971f; font-weight: bold;">false</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>
</div>


<div id="outline-container-org1bbaa87" class="outline-2">
<h2 id="org1bbaa87">global-naming-stack &amp; name-record</h2>
<div class="outline-text-2" id="text-org1bbaa87">
</div><div id="outline-container-orgd3371f4" class="outline-3">
<h3 id="orgd3371f4"><span class="todo note">note</span> global-naming-stack</h3>
<div class="outline-text-3" id="text-orgd3371f4">
<ul class="org-ul">
<li><p>(define-*) push</p><p>(undo) pop</p></li></ul>
</div>
</div>

<div id="outline-container-orga5ff813" class="outline-3">
<h3 id="orga5ff813"><span class="todo note">note</span> name-record</h3>
<div class="outline-text-3" id="text-orga5ff813">
<ul class="org-ul">
<li><p><b>global-naming-stack</b> contain name-record</p></li>
<li><p><p></p><p>structure</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">name-record</td></p><p><td class="org-left">old-jo</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">name</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">new-jo</td></p><p></tr></p><p></tbody></p><p></table></p></li></ul>
</div>
</div>

<div id="outline-container-orgdd21425" class="outline-3">
<h3 id="orgdd21425"><b>global-naming-stack</b></h3>
<div class="outline-text-3" id="text-orgdd21425">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">100</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">3</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*unit*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">global-naming-stack:*size*</span>
<span style="color: #fd971f; font-weight: bold;">global-naming-stack:*unit*</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*global-naming-stack*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*global-naming-stack*</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgfb94f71" class="outline-3">
<h3 id="orgfb94f71">name-record:[get|set]-old-jo</h3>
<div class="outline-text-3" id="text-orgfb94f71">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-record:get-old-jo</span>
  <span style="color: #FF8888;">&lt;&lt; name-record -- old-jo &gt;&gt;</span>
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-record:set-old-jo</span>
  <span style="color: #FF8888;">&lt;&lt; old-jo, name-record -- &gt;&gt;</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org62bea9b" class="outline-3">
<h3 id="org62bea9b">name-record:[get|set]-name</h3>
<div class="outline-text-3" id="text-org62bea9b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-record:get-name</span>
  <span style="color: #FF8888;">&lt;&lt; name-record -- name &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-record:set-name</span>
  <span style="color: #FF8888;">&lt;&lt; name, name-record -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org9709fe8" class="outline-3">
<h3 id="org9709fe8">name-record:[get|set]-new-jo</h3>
<div class="outline-text-3" id="text-org9709fe8">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-record:get-new-jo</span>
  <span style="color: #FF8888;">&lt;&lt; name-record -- new-jo &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-record:set-new-jo</span>
  <span style="color: #FF8888;">&lt;&lt; new-jo, name-record -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org21b8aea" class="outline-3">
<h3 id="org21b8aea">global-naming-stack:record-jo</h3>
<div class="outline-text-3" id="text-org21b8aea">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">global-naming-stack:record-jo</span>
  <span style="color: #FF8888;">&lt;&lt; jo, name -- &gt;&gt;</span>
  dup name,get-jo
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>set-old-jo
  dup2 name,set-jo
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>set-name
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>set-new-jo
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> add-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org535ae38" class="outline-3">
<h3 id="org535ae38">global-naming-stack:delete-last-record</h3>
<div class="outline-text-3" id="text-org535ae38">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">global-naming-stack:delete-last-record</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*unit*</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span>
  sub-set
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-old-jo
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-name
  name,set-jo
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org269f325" class="outline-3">
<h3 id="org269f325">jo,find-name</h3>
<div class="outline-text-3" id="text-org269f325">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jo,find-name,loop</span>
  <span style="color: #FF8888;">&lt;&lt; jo, current-record</span>
<span style="color: #FF8888;">     -- name, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">*global-naming-stack*</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*unit*</span> sub
  dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:name-record</span>
  over
  <span style="color: #83EA83; font-weight: bold;">:name-record</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-new-jo <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #83EA83; font-weight: bold;">:name-record</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-name
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jo,find-name</span>
  <span style="color: #FF8888;">&lt;&lt; jo</span>
<span style="color: #FF8888;">     -- name, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span>
  jo,find-name,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb14841b" class="outline-3">
<h3 id="orgb14841b">name-hash-table,record-jo,by-link</h3>
<div class="outline-text-3" id="text-orgb14841b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-hash-table,record-jo,by-link</span>
  <span style="color: #FF8888;">&lt;&lt; link -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:link</span>
  <span style="color: #83EA83; font-weight: bold;">:link</span> link<span style="color: #b0b1a3;">-&gt;</span>jo
  <span style="color: #83EA83; font-weight: bold;">:link</span> link<span style="color: #b0b1a3;">-&gt;</span>name-string string<span style="color: #b0b1a3;">-&gt;</span>name
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>record-jo
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org1015b4a" class="outline-2">
<h2 id="org1015b4a">jojo-compiler-syntax:quote</h2>
<div class="outline-text-2" id="text-org1015b4a">
</div><div id="outline-container-org7dc5086" class="outline-3">
<h3 id="org7dc5086">quote-word?</h3>
<div class="outline-text-3" id="text-org7dc5086">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">quote-word?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">less-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #e6db74;">"'"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2fbaee0" class="outline-3">
<h3 id="org2fbaee0">jojo-compiler-syntax:quote</h3>
<div class="outline-text-3" id="text-org2fbaee0">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:quote</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], word[address, length] --</span>
<span style="color: #FF8888;">     string[address, length] &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> instruction,literal
    jojo-area,stay
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte-tail string<span style="color: #b0b1a3;">-&gt;</span>name
    jojo-area,stay
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org3ff7488" class="outline-3">
<h3 id="org3ff7488">more,syntax-rule-set:jojo-compiler</h3>
<div class="outline-text-3" id="text-org3ff7488">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">more,syntax-rule-set:jojo-compiler</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">jojo-compiler:*syntax-rule-set*</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">quote-word?</span> <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>quote <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
<span style="color: #ffffff; font-weight: bold;">more,syntax-rule-set:</span>jojo-compiler
</pre>
</div>
</div>
</div>

<div id="outline-container-org815b741" class="outline-3">
<h3 id="org815b741"><span class="done test">test</span> jojo-compiler-syntax:quote</h3>
<div class="outline-text-3" id="text-org815b741">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) jojo-compiler-syntax:quote"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">'testing--jojo-compiler-syntax:quote</span> name<span style="color: #b0b1a3;">-&gt;</span>string
  <span style="color: #e6db74;">"testing--jojo-compiler-syntax:quote"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org807fc85" class="outline-2">
<h2 id="org807fc85">scope-stack &amp; offset-record</h2>
<div class="outline-text-2" id="text-org807fc85">
</div><div id="outline-container-orgab49ed4" class="outline-3">
<h3 id="orgab49ed4"><b>scope-stack</b></h3>
<div class="outline-text-3" id="text-orgab49ed4">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*unit*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">scope-stack:*size*</span>
<span style="color: #fd971f; font-weight: bold;">scope-stack:*unit*</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*scope-stack*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*scope-stack*</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2f80411" class="outline-3">
<h3 id="org2f80411"><span class="todo note">note</span> offset-record</h3>
<div class="outline-text-3" id="text-org2f80411">
<ul class="org-ul">
<li><p><p></p><p>structure</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">offset-record</td></p><p><td class="org-left">name</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">offset</td></p><p></tr></p><p></tbody></p><p></table></p><p><p></p><p>specially</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-right" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">scope-delimiter</td></p><p><td class="org-right">0</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-right">0</td></p><p></tr></p><p></tbody></p><p></table></p></li></ul>
</div>
</div>

<div id="outline-container-org6d8f0e8" class="outline-3">
<h3 id="org6d8f0e8">offset-record,[get|set]-name</h3>
<div class="outline-text-3" id="text-org6d8f0e8">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">offset-record,get-name</span>
  <span style="color: #FF8888;">&lt;&lt; offset-record -- name &gt;&gt;</span>
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">offset-record,set-name</span>
  <span style="color: #FF8888;">&lt;&lt; name, offset-record -- &gt;&gt;</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc62c40d" class="outline-3">
<h3 id="orgc62c40d">offset-record,[get|set]-offset</h3>
<div class="outline-text-3" id="text-orgc62c40d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">offset-record,get-offset</span>
  <span style="color: #FF8888;">&lt;&lt; offset-record -- offset &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">offset-record,set-offset</span>
  <span style="color: #FF8888;">&lt;&lt; offset, offset-record -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf289300" class="outline-3">
<h3 id="orgf289300">offset-record,scope-delimiter?</h3>
<div class="outline-text-3" id="text-orgf289300">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">offset-record,scope-delimiter?</span>
  <span style="color: #FF8888;">&lt;&lt; offset-record -- bool &gt;&gt;</span>
  offset-record,get-name <span style="color: #ffffff; font-weight: bold;">zero?</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org77a1363" class="outline-3">
<h3 id="org77a1363">scope-stack:find</h3>
<div class="outline-text-3" id="text-org77a1363">
<ul class="org-ul">
<li><p>from the pointer to the base</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">scope-stack:find,loop</span>
  <span style="color: #FF8888;">&lt;&lt; name, cursor</span>
<span style="color: #FF8888;">     -- offset-record, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">*scope-stack*</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">scope-stack:*unit*</span> sub <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> offset-record,get-name
  <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">scope-stack:find</span>
  <span style="color: #FF8888;">&lt;&lt; name</span>
<span style="color: #FF8888;">     -- offset-record, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">scope-stack:</span>find,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgec2fc06" class="outline-3">
<h3 id="orgec2fc06">scope-stack:get-current-offset</h3>
<div class="outline-text-3" id="text-orgec2fc06">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">scope-stack:get-current-offset</span>
  <span style="color: #FF8888;">&lt;&lt; -- offset &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*scope-stack*</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (scope-stack:get-current-offset) fail"</span> .s .l
    <span style="color: #e6db74;">"  for the scope-stack is empty"</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span>
  <span style="color: #fd971f; font-weight: bold;">scope-stack:*unit*</span> sub
  dup <span style="color: #ffffff; font-weight: bold;">offset-record,scope-delimiter?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #fd971f; font-weight: bold;">0</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup
  offset-record,get-name
  name<span style="color: #b0b1a3;">-&gt;</span>string count-front-colon <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
  swap
  offset-record,get-offset
  add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgd19cfe2" class="outline-2">
<h2 id="orgd19cfe2">await &amp; awake</h2>
<div class="outline-text-2" id="text-orgd19cfe2">
</div><div id="outline-container-orgf2340b6" class="outline-3">
<h3 id="orgf2340b6"><span class="todo note">note</span> notation</h3>
<div class="outline-text-3" id="text-orgf2340b6">
<ul class="org-ul">
<li><p><p></p><p>table</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">期待 [非局部退出點]</td></p><p><td class="org-left">await [make non-local-exit-piont]</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">動意 [非局部退出信號]</td></p><p><td class="org-left">awake [non-local-exit-signal]</td></p><p></tr></p><p></tbody></p><p></table></p></li></ul>
</div>
</div>

<div id="outline-container-org397f9b2" class="outline-3">
<h3 id="org397f9b2"><b>awaiting-stack</b></h3>
<div class="outline-text-3" id="text-org397f9b2">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*unit*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">awaiting-stack:*size*</span>
<span style="color: #fd971f; font-weight: bold;">awaiting-stack:*unit*</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*awaiting-stack*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*awaiting-stack*</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*pointer*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb427d58" class="outline-3">
<h3 id="orgb427d58"><span class="todo note">note</span> action</h3>
<div class="outline-text-3" id="text-orgb427d58">
<ul class="org-ul">
<li><p><p></p><p>structure</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">action</td></p><p><td class="org-left">function</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">argument-stack</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">return-stack</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">name</td></p><p></tr></p><p></tbody></p><p></table></p></li></ul>
</div>
</div>

<div id="outline-container-orgf929deb" class="outline-3">
<h3 id="orgf929deb">action,[get|set]-function</h3>
<div class="outline-text-3" id="text-orgf929deb">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">action,get-function</span>
  <span style="color: #FF8888;">&lt;&lt; action -- function &gt;&gt;</span>
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">action,set-function</span>
  <span style="color: #FF8888;">&lt;&lt; function, action -- &gt;&gt;</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5121a5b" class="outline-3">
<h3 id="org5121a5b">action,[get|set]-argument-stack-pointer</h3>
<div class="outline-text-3" id="text-org5121a5b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">action,get-argument-stack-pointer</span>
  <span style="color: #FF8888;">&lt;&lt; action -- argument-stack-pointer &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">action,set-argument-stack-pointer</span>
  <span style="color: #FF8888;">&lt;&lt; argument-stack-pointer, action -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orga238126" class="outline-3">
<h3 id="orga238126">action,[get|set]-return-stack-pointer</h3>
<div class="outline-text-3" id="text-orga238126">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">action,get-return-stack-pointer</span>
  <span style="color: #FF8888;">&lt;&lt; action -- return-stack-pointer &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">action,set-return-stack-pointer</span>
  <span style="color: #FF8888;">&lt;&lt; return-stack-pointer, action -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orga5dc5f1" class="outline-3">
<h3 id="orga5dc5f1">action,[get|set]-name</h3>
<div class="outline-text-3" id="text-orga5dc5f1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">action,get-name</span>
  <span style="color: #FF8888;">&lt;&lt; action -- name &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">3</span> mul add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">action,set-name</span>
  <span style="color: #FF8888;">&lt;&lt; name, action -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">3</span> mul add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org848857c" class="outline-3">
<h3 id="org848857c">drop-awaiting-stack</h3>
<div class="outline-text-3" id="text-org848857c">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">drop-awaiting-stack</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*pointer*</span> sub-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orge28b7a6" class="outline-3">
<h3 id="orge28b7a6">awaiting-stack:find</h3>
<div class="outline-text-3" id="text-orge28b7a6">
<ul class="org-ul">
<li><p>from the pointer to the base</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">awaiting-stack:find,loop</span>
  <span style="color: #FF8888;">&lt;&lt; name, cursor</span>
<span style="color: #FF8888;">     -- action, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">*awaiting-stack*</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*unit*</span> sub <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> action,get-name
  <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">awaiting-stack:find</span>
  <span style="color: #FF8888;">&lt;&lt; name</span>
<span style="color: #FF8888;">     -- action, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">awaiting-stack:</span>find,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orge5eec8d" class="outline-3">
<h3 id="orge5eec8d">await</h3>
<div class="outline-text-3" id="text-orge5eec8d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">await</span>
  <span style="color: #FF8888;">&lt;&lt; function, name -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:function</span>

  snapshot-the-stack-pointer
  <span style="color: #fd971f; font-weight: bold;">*the-stack-pointer-snapshot*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:argument-stack-pointer</span>

  get-return-stack-pointer
  <span style="color: #fd971f; font-weight: bold;">return-stack:*unit*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul sub <span style="color: #FF4C4C; font-weight: bold;">&gt;:return-stack-pointer</span>

  <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:action</span>
  <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*pointer*</span> add-set

  <span style="color: #83EA83; font-weight: bold;">:function</span>
  <span style="color: #83EA83; font-weight: bold;">:action</span>
  action,set-function

  <span style="color: #83EA83; font-weight: bold;">:argument-stack-pointer</span>
  <span style="color: #83EA83; font-weight: bold;">:action</span>
  action,set-argument-stack-pointer

  <span style="color: #83EA83; font-weight: bold;">:return-stack-pointer</span>
  <span style="color: #83EA83; font-weight: bold;">:action</span>
  action,set-return-stack-pointer

  <span style="color: #83EA83; font-weight: bold;">:name</span>
  <span style="color: #83EA83; font-weight: bold;">:action</span>
  action,set-name

  <span style="color: #f92672; font-weight: bold;">jo</span> drop-awaiting-stack
  <span style="color: #83EA83; font-weight: bold;">:return-stack-pointer</span>
  <span style="color: #ffffff; font-weight: bold;">return-stack:</span>insert-jo
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org801f22e" class="outline-3">
<h3 id="org801f22e">action,apply</h3>
<div class="outline-text-3" id="text-org801f22e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">action,apply</span>
  <span style="color: #FF8888;">&lt;&lt; action -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:action</span>
  <span style="color: #83EA83; font-weight: bold;">:action</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*pointer*</span> set
  <span style="color: #83EA83; font-weight: bold;">:action</span> action,get-return-stack-pointer
  <span style="color: #83EA83; font-weight: bold;">:action</span> action,get-function
  <span style="color: #00ffff; font-weight: bold;">apply-with-return-point</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org7901692" class="outline-3">
<h3 id="org7901692">action,reset-the-stack</h3>
<div class="outline-text-3" id="text-org7901692">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">action,reset-the-stack</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">awaiting-stack:*pointer*</span> action,get-argument-stack-pointer
  set-argument-stack-pointer
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org6dfcafa" class="outline-3">
<h3 id="org6dfcafa">awake</h3>
<div class="outline-text-3" id="text-org6dfcafa">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">awake</span>
  <span style="color: #FF8888;">&lt;&lt; name -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #ffffff; font-weight: bold;">awaiting-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    action,apply
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (awake) can not find action in awaiting-stack by : "</span> .s <span style="color: #83EA83; font-weight: bold;">:name</span> name<span style="color: #b0b1a3;">-&gt;</span>string .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4393d8b" class="outline-3">
<h3 id="org4393d8b"><span class="done test">test</span> await &amp; awake</h3>
<div class="outline-text-3" id="text-org4393d8b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">testing-awake</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">'signal</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">testing-await</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"after reset-the-stack"</span>
  <span style="color: #93a8c6;">[</span> <span style="color: #e6db74;">"before reset-the-stack"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
    action,reset-the-stack
    <span style="color: #e6db74;">"after reset-the-stack"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #93a8c6;">]</span>
  <span style="color: #fd971f; font-weight: bold;">'signal</span> <span style="color: #1ef15f; font-weight: bold;">await</span>
  <span style="color: #e6db74;">"something in the stack"</span>
  <span style="color: #e6db74;">"before reset-the-stack"</span>
  testing-awake
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) await &amp; awake"</span> .s .l
  testing-await
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org3888548" class="outline-2">
<h2 id="org3888548">basic-REPL</h2>
<div class="outline-text-2" id="text-org3888548">
</div><div id="outline-container-org3978c45" class="outline-3">
<h3 id="org3978c45">syntax-rule-set:*word-interpreter*</h3>
<div class="outline-text-3" id="text-org3978c45">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">1024</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*syntax-rule-set:word-interpreter,size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #FF8888;">&lt;&lt; for cursor &gt;&gt;</span>
<span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span> drop

<span style="color: #fd971f; font-weight: bold;">*syntax-rule-set:word-interpreter,size*</span>
<span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> sub
set
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb56209b" class="outline-3">
<h3 id="orgb56209b">word-interpreter</h3>
<div class="outline-text-3" id="text-orgb56209b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- unknown &gt;&gt;</span>
  dup2 find-syntax <span style="color: #f92672; font-weight: bold;">if</span>
    apply
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2
  name-hash-table,find-jo <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #FF8888;">&lt;&lt; function &amp; primitive-function &amp; variable &gt;&gt;</span>
    xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x drop2
    apply
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (word-interpreter) meets undefined word : "</span> .s
  .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org872d949" class="outline-3">
<h3 id="org872d949">word-interpreter-syntax:bye</h3>
<div class="outline-text-3" id="text-org872d949">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:bye</span>
  <span style="color: #FF8888;">&lt;&lt; literal-word:bye -- &gt;&gt;</span>
  drop2
  <span style="color: #fd971f; font-weight: bold;">'bye,basic-REPL</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org185be" class="outline-3">
<h3 id="org185be">bye,basic-REPL</h3>
<div class="outline-text-3" id="text-org185be">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">bye,basic-REPL</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  action,reset-the-stack
  drop-syntax-stack
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf7aea9e" class="outline-3">
<h3 id="orgf7aea9e">basic-REPL&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></h3>
<div class="outline-text-3" id="text-orgf7aea9e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">basic-REPL,loop</span>
  <span style="color: #FF8888;">&lt;&lt; unknown -- unknown &gt;&gt;</span>
  read-word
  word-interpreter
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">basic-REPL</span>
  <span style="color: #FF8888;">&lt;&lt; unknown -- unknown &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> bye,basic-REPL
  <span style="color: #fd971f; font-weight: bold;">'bye,basic-REPL</span> <span style="color: #1ef15f; font-weight: bold;">await</span>
  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> push-syntax-stack
  basic-REPL,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2f89078" class="outline-3">
<h3 id="org2f89078">number with base</h3>
<div class="outline-text-3" id="text-org2f89078">
</div><div id="outline-container-org241d316" class="outline-4">
<h4 id="org241d316"><span class="todo _">記</span> 原理</h4>
<div class="outline-text-4" id="text-org241d316">
<ul class="org-ul">
<li><p>現在 的 number 就只是 "integer" 而已</p><p>更多的數的類型將在 cicada 中實現</p></li>
<li><p>在 "integer" 這個函數中 我將只支持 對四種進位制的 字符串的 閱讀</p><p><ul class="org-ul"></p><p><li><p>十進制</p><p>10#1231</p><p>10#-1231</p><p>1231</p><p>-1231</p></li></p><p><li><p>二進制</p><p>2#101001</p><p>2#-101001</p><p>2#-1011_1001</p><p>"-" 和 "_" 的同時存在有點難讀</p><p>此時可以用 2#1011_1001 negate</p><p>也就是說雖然允許用 "-" 來表示負數</p><p>但是不鼓勵這樣做</p><p>之所以允許這樣做</p><p>是因爲在打印負數的時候需要這種表示方式</p><p>不能把 "-123" 打印成 "123 negate"</p></li></p><p><li><p>八進制</p><p>8#712537</p><p>8#-712537</p></li></p><p><li><p>十六進制</p><p>16#f123acb3</p><p>16#-F123ACB3</p><p>大寫小寫字母都可以</p></li></ul></p></li>
<li><p>one can use "_" to separate the number</p><p>to make it more readable</p><p>for example</p><p>2#1111_0101_0001</p></li>
<li><p>actually, the base can be any 10 based number</p><p>even greater then 36</p><p>but when the base is greater then 36</p><p>not all integer can be represented under this base</p><p>for we only have 36 bytes</p></li></ul>
</div>
</div>

<div id="outline-container-org21726ed" class="outline-4">
<h4 id="org21726ed">remove-byte!</h4>
<div class="outline-text-4" id="text-org21726ed">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">remove-byte!,loop</span>
  <span style="color: #FF8888;">&lt;&lt; cursor, length, byte -- cursor &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:byte</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> get-byte <span style="color: #83EA83; font-weight: bold;">:byte</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span> add1 <span style="color: #83EA83; font-weight: bold;">:length</span> sub1
    <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    string<span style="color: #b0b1a3;">-&gt;</span>buffer!
    <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    <span style="color: #83EA83; font-weight: bold;">:length</span> sub1
    <span style="color: #83EA83; font-weight: bold;">:byte</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span> add1
    <span style="color: #83EA83; font-weight: bold;">:length</span> sub1
    <span style="color: #83EA83; font-weight: bold;">:byte</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">remove-byte!</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], byte -- string[address, length] &gt;&gt;</span>
  x<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>xx <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  remove-byte!,loop <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:address</span> sub
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc9a7494" class="outline-4">
<h4 id="orgc9a7494"><span class="done test">test</span> remove-byte!</h4>
<div class="outline-text-4" id="text-orgc9a7494">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) remove-byte!"</span> .s .l
  <span style="color: #e6db74;">"2#1001_1001"</span>
  <span style="color: #e6db74;">"_"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte remove-byte!
  <span style="color: #e6db74;">"2#10011001"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #e6db74;">"___2#1001___1001___"</span>
  <span style="color: #e6db74;">"_"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte remove-byte!
  <span style="color: #e6db74;">"2#10011001"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb217f0a" class="outline-4">
<h4 id="orgb217f0a">latin-byte?</h4>
<div class="outline-text-4" id="text-orgb217f0a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">latin-byte?</span>
  <span style="color: #FF8888;">&lt;&lt; byte -- bool &gt;&gt;</span>
  dup <span style="color: #e6db74;">"A"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">less-than?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #e6db74;">"Z"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">less-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #e6db74;">"a"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">less-than?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #e6db74;">"z"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">less-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop <span style="color: #fd971f; font-weight: bold;">false</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org1a61861" class="outline-4">
<h4 id="org1a61861">latin-byte-&gt;number</h4>
<div class="outline-text-4" id="text-org1a61861">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">latin-byte-&gt;number</span>
  <span style="color: #FF8888;">&lt;&lt; latin-byte -- number &gt;&gt;</span>
  dup <span style="color: #e6db74;">"A"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">less-than?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (latin-byte-&gt;number) the argument must be a latin-byte"</span> .s .l
    <span style="color: #e6db74;">"  but the following byte is less-than 'A' : "</span> .s
    .i .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #e6db74;">"Z"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">less-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"A"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
    sub
    <span style="color: #fd971f; font-weight: bold;">10</span> add
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #e6db74;">"a"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">less-than?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (latin-byte-&gt;number) the argument must be a latin-byte"</span> .s .l
    <span style="color: #e6db74;">"  but the following byte is less-than 'a' but greater-then 'Z' : "</span> .s
    .i .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #e6db74;">"z"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">less-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"a"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
    sub
    <span style="color: #fd971f; font-weight: bold;">10</span> add
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (latin-byte-&gt;number) the argument must be a latin-byte"</span> .s .l
  <span style="color: #e6db74;">"  but the following byte is greater-then 'z' : "</span> .s
  .i .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org670e130" class="outline-4">
<h4 id="org670e130">number-&gt;latin-byte</h4>
<div class="outline-text-4" id="text-org670e130">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">number-&gt;latin-byte</span>
  <span style="color: #FF8888;">&lt;&lt; number -- latin-byte &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">10</span> sub
  <span style="color: #e6db74;">"a"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5d67819" class="outline-4">
<h4 id="org5d67819">wild-digit-string?</h4>
<div class="outline-text-4" id="text-org5d67819">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">wild-digit-string?</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- bool &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2 <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  over get-byte
  dup <span style="color: #ffffff; font-weight: bold;">digit-byte?</span>
  swap <span style="color: #ffffff; font-weight: bold;">latin-byte?</span>
  or <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">string:</span>byte-tail
    <span style="color: #00ffff; font-weight: bold;">loop</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop2
  <span style="color: #fd971f; font-weight: bold;">false</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org6843cad" class="outline-4">
<h4 id="org6843cad">wild-integer-string?</h4>
<div class="outline-text-4" id="text-org6843cad">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">wild-integer-string?</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- bool &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2 <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #e6db74;">"-"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">string:</span>byte-tail
    <span style="color: #ffffff; font-weight: bold;">wild-digit-string?</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">wild-digit-string?</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orge4742ba" class="outline-4">
<h4 id="orge4742ba"><span class="done test">test</span> wild-integer-string?</h4>
<div class="outline-text-4" id="text-orge4742ba">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) wild-integer-string?"</span> .s .l
  ""        <span style="color: #ffffff; font-weight: bold;">wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">false?</span>
  <span style="color: #e6db74;">" "</span>       <span style="color: #ffffff; font-weight: bold;">wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and
  <span style="color: #e6db74;">"_asd"</span>    <span style="color: #ffffff; font-weight: bold;">wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and
  <span style="color: #e6db74;">" asd"</span>    <span style="color: #ffffff; font-weight: bold;">wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and
  <span style="color: #e6db74;">"asd"</span>     <span style="color: #ffffff; font-weight: bold;">wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">true?</span>  and
  <span style="color: #e6db74;">"123"</span>     <span style="color: #ffffff; font-weight: bold;">wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">true?</span>  and
  <span style="color: #e6db74;">"123asd"</span>  <span style="color: #ffffff; font-weight: bold;">wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">true?</span>  and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org600eb5b" class="outline-4">
<h4 id="org600eb5b">base#wild-integer-string?</h4>
<div class="outline-text-4" id="text-org600eb5b">
<ul class="org-ul">
<li><p>a string for the following format</p><p>is viewed as a base#digit-string</p><p>&lt;digit-string&gt;#[-]&lt;wild-integer-string-string&gt;</p><p>any "_" in the anywhere of the above string</p><p>will be ignored</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">base#wild-integer-string?</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- bool &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">128</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:string-address</span>
  tuck
  <span style="color: #83EA83; font-weight: bold;">:string-address</span>
  string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #83EA83; font-weight: bold;">:string-address</span> swap
  <span style="color: #e6db74;">"_"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  remove-byte!
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:new-string-length</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:new-string-address</span>
  <span style="color: #FF8888;">&lt;&lt; dup2 .s .l 0 end &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:new-string-address</span>
  <span style="color: #83EA83; font-weight: bold;">:new-string-length</span>
  <span style="color: #e6db74;">"#"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #ffffff; font-weight: bold;">string:</span>find-byte <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address-of-#</span>
  <span style="color: #83EA83; font-weight: bold;">:new-string-address</span>
  <span style="color: #83EA83; font-weight: bold;">:address-of-#</span> <span style="color: #83EA83; font-weight: bold;">:new-string-address</span> sub
  <span style="color: #dc322f; font-weight: bold;">&gt;::base-string</span>
  <span style="color: #83EA83; font-weight: bold;">:address-of-#</span> add1
  <span style="color: #83EA83; font-weight: bold;">:address-of-#</span> <span style="color: #83EA83; font-weight: bold;">:new-string-address</span> sub add1
  <span style="color: #83EA83; font-weight: bold;">:new-string-length</span> swap sub
  <span style="color: #dc322f; font-weight: bold;">&gt;::wild-integer-string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::base-string</span> <span style="color: #ffffff; font-weight: bold;">digit-string?</span>
  <span style="color: #5CDD5C; font-weight: bold;">::base-string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>empty? not
  and <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::wild-integer-string</span> <span style="color: #ffffff; font-weight: bold;">wild-integer-string?</span>
  <span style="color: #5CDD5C; font-weight: bold;">::wild-integer-string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>empty? not
  and <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf4c3e3b" class="outline-4">
<h4 id="orgf4c3e3b"><span class="done test">test</span> base#wild-integer-string?</h4>
<div class="outline-text-4" id="text-orgf4c3e3b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) base#wild-integer-string?"</span> .s .l
  <span style="color: #e6db74;">"#"</span>     <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">false?</span>
  <span style="color: #e6db74;">"##"</span>    <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and
  <span style="color: #e6db74;">"#___#"</span> <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and
  <span style="color: #e6db74;">"   "</span>   <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and
  <span style="color: #e6db74;">"______#__1___"</span> <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and
  <span style="color: #e6db74;">"___2___#__1___c29bf210019___&#28450;&#23383;"</span> <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and

  <span style="color: #e6db74;">"1#1"</span> <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">true?</span> and
  <span style="color: #e6db74;">"123#1c29bf219g42"</span> <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">true?</span> and
  <span style="color: #e6db74;">"___2___#__1___c29bf210019___g42"</span> <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span> <span style="color: #ffffff; font-weight: bold;">true?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4cf9980" class="outline-4">
<h4 id="org4cf9980">base#wild-integer-string-&gt;base-string</h4>
<div class="outline-text-4" id="text-org4cf9980">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">base#wild-integer-string-&gt;base-string</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- string[address, length] &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #e6db74;">"#"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #ffffff; font-weight: bold;">string:</span>find-byte <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (base#wild-integer-string-&gt;base-string)"</span> .s .l
    <span style="color: #e6db74;">"  the argument must be a base#wild-integer-string"</span> .s .l
    <span style="color: #e6db74;">"  but the following string does not even have a '#' in it :"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s
    <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span> .s .l
    <span style="color: #FF8888;">&lt;&lt; to balance the argument-stack or not ??? &gt;&gt;</span>
    <span style="color: #FF8888;">&lt;&lt; :address :length &gt;&gt;</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address-of-#</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span>
  <span style="color: #83EA83; font-weight: bold;">:address-of-#</span> <span style="color: #83EA83; font-weight: bold;">:address</span> sub
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org46caf41" class="outline-4">
<h4 id="org46caf41">base#wild-integer-string-&gt;wild-integer-string</h4>
<div class="outline-text-4" id="text-org46caf41">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">base#wild-integer-string-&gt;wild-integer-string</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- string[address, length] &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #e6db74;">"#"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #ffffff; font-weight: bold;">string:</span>find-byte <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (base#wild-integer-string-&gt;wild-integer-string)"</span> .s .l
    <span style="color: #e6db74;">"  the argument must be a base#wild-integer-string"</span> .s .l
    <span style="color: #e6db74;">"  but the following string does not even have a '#' in it :"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s
    <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span> .s .l
    <span style="color: #FF8888;">&lt;&lt; to balance the argument-stack or not ??? &gt;&gt;</span>
    <span style="color: #FF8888;">&lt;&lt; :address :length &gt;&gt;</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address-of-#</span>
  <span style="color: #83EA83; font-weight: bold;">:address-of-#</span> add1
  <span style="color: #83EA83; font-weight: bold;">:address-of-#</span> <span style="color: #83EA83; font-weight: bold;">:address</span> sub add1
  <span style="color: #83EA83; font-weight: bold;">:length</span> swap sub
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org8162a29" class="outline-4">
<h4 id="org8162a29"><span class="done test">test</span> base#wild-integer-string-&gt;base-string</h4>
<div class="outline-text-4" id="text-org8162a29">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) base#wild-integer-string-&gt;base-string"</span> .s .l
  <span style="color: #FF8888;">&lt;&lt; error</span>
<span style="color: #FF8888;">  "___2___ __1___c29bf210019___&#28450;&#23383;" base#wild-integer-string-&gt;base-string</span>
<span style="color: #FF8888;">  &gt;&gt;</span>

  <span style="color: #e6db74;">"1#1"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>base-string
  <span style="color: #e6db74;">"1"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?

  <span style="color: #e6db74;">"123#1c29bf219g42"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>base-string
  <span style="color: #e6db74;">"123"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and

  <span style="color: #e6db74;">"___2___#__1___c29bf210019___g42"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>base-string
  <span style="color: #e6db74;">"___2___"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) base#wild-integer-string-&gt;wild-integer-string"</span> .s .l
  <span style="color: #FF8888;">&lt;&lt; error</span>
<span style="color: #FF8888;">  "___2___ __1___c29bf210019___&#28450;&#23383;" base#wild-integer-string-&gt;wild-integer-string</span>
<span style="color: #FF8888;">  &gt;&gt;</span>

  <span style="color: #e6db74;">"1#1"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>wild-integer-string
  <span style="color: #e6db74;">"1"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?

  <span style="color: #e6db74;">"123#1c29bf219g42"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>wild-integer-string
  <span style="color: #e6db74;">"1c29bf219g42"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and

  <span style="color: #e6db74;">"___2___#__1___c29bf210019___g42"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>wild-integer-string
  <span style="color: #e6db74;">"__1___c29bf210019___g42"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org88b476" class="outline-4">
<h4 id="org88b476">wild-integer-string-&gt;integer,with-base</h4>
<div class="outline-text-4" id="text-org88b476">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">wild-integer-string-&gt;integer,with-base,loop</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], base, sum, counter -- integer &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:counter</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:sum</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:base</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:sum</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span> get-byte <span style="color: #FF4C4C; font-weight: bold;">&gt;:byte</span>
  <span style="color: #83EA83; font-weight: bold;">:byte</span> <span style="color: #ffffff; font-weight: bold;">digit-byte?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:byte</span> digit-byte<span style="color: #b0b1a3;">-&gt;</span>number
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:byte</span> <span style="color: #ffffff; font-weight: bold;">latin-byte?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:byte</span> latin-byte<span style="color: #b0b1a3;">-&gt;</span>number
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:base</span> <span style="color: #83EA83; font-weight: bold;">:counter</span> power
  mul
  <span style="color: #83EA83; font-weight: bold;">:sum</span> add
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:sum</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span> add1
  <span style="color: #83EA83; font-weight: bold;">:length</span> sub1
  <span style="color: #83EA83; font-weight: bold;">:base</span>
  <span style="color: #83EA83; font-weight: bold;">:sum</span>
  <span style="color: #83EA83; font-weight: bold;">:counter</span> add1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">wild-integer-string-&gt;integer,with-base</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], base -- integer &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:base</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">0</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #e6db74;">"-"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">string:</span>byte-tail
    <span style="color: #fd971f; font-weight: bold;">-1</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:sign</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:sign</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> string-reverse!
  <span style="color: #83EA83; font-weight: bold;">:base</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #fd971f; font-weight: bold;">0</span> wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer,with-base,loop
  <span style="color: #83EA83; font-weight: bold;">:sign</span> mul
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> string-reverse!
  drop2
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgacb9e4d" class="outline-4">
<h4 id="orgacb9e4d">base#wild-integer-string-&gt;integer</h4>
<div class="outline-text-4" id="text-orgacb9e4d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">base#wild-integer-string-&gt;integer</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- integer &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">128</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span>
    <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  tuck <span style="color: #83EA83; font-weight: bold;">:address</span> string<span style="color: #b0b1a3;">-&gt;</span>buffer!
    <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #e6db74;">"_"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte remove-byte!
    <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span>
  base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>base-string
    <span style="color: #dc322f; font-weight: bold;">&gt;::base-string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span>
  base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>wild-integer-string
    <span style="color: #dc322f; font-weight: bold;">&gt;::wild-integer-string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::base-string</span>
  digit-string<span style="color: #b0b1a3;">-&gt;</span>number
    <span style="color: #FF4C4C; font-weight: bold;">&gt;:base</span>
  <span style="color: #5CDD5C; font-weight: bold;">::wild-integer-string</span>
  <span style="color: #83EA83; font-weight: bold;">:base</span>
  wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer,with-base
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org3bb783e" class="outline-4">
<h4 id="org3bb783e"><span class="done test">test</span> base#wild-integer-string-&gt;integer</h4>
<div class="outline-text-4" id="text-org3bb783e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) base#wild-integer-string-&gt;integer"</span> .s .l
  <span style="color: #e6db74;">"0#111"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span>

  <span style="color: #e6db74;">"1#111"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span>
  and

  <span style="color: #e6db74;">"10#123"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #e6db74;">"_1_0__#_1__2_3_"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">3</span> mul
  <span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">2</span> mul add
  <span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  tuck <span style="color: #ffffff; font-weight: bold;">equal?</span>
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  and

  <span style="color: #e6db74;">"2#1000"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #e6db74;">"2#_1000_"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">0</span> mul
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">0</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">0</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">3</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  tuck <span style="color: #ffffff; font-weight: bold;">equal?</span>
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  and

  <span style="color: #e6db74;">"2#1111_1111"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">3</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">4</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">5</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">6</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">7</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span>
  and

  <span style="color: #e6db74;">"16#f_f"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #fd971f; font-weight: bold;">16</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">15</span> mul
  <span style="color: #fd971f; font-weight: bold;">16</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">15</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span>
  and

  <span style="color: #e6db74;">"100#111"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #fd971f; font-weight: bold;">100</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul
  <span style="color: #fd971f; font-weight: bold;">100</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">100</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span>
  and

  <span style="color: #e6db74;">"64#zzz"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul add
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span>
  and

  <span style="color: #e6db74;">"36#zzzz"</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
  <span style="color: #fd971f; font-weight: bold;">36</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul
  <span style="color: #fd971f; font-weight: bold;">36</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul add
  <span style="color: #fd971f; font-weight: bold;">36</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul add
  <span style="color: #fd971f; font-weight: bold;">36</span> <span style="color: #fd971f; font-weight: bold;">3</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span>
  and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd50b903" class="outline-4">
<h4 id="orgd50b903"><span class="todo note">note</span> writers</h4>
<div class="outline-text-4" id="text-orgd50b903">
<ul class="org-ul">
<li><p>a general function</p><p>and three special ones</p></li>
<li><p>they all writer integer</p></li>
<li><p>I will implemented them by syntax when needed</p></li></ul>
</div>
</div>

<div id="outline-container-orgdae31cd" class="outline-4">
<h4 id="orgdae31cd">.#</h4>
<div class="outline-text-4" id="text-orgdae31cd">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">.#,loop</span>
  <span style="color: #FF8888;">&lt;&lt; number, base, cursor -- cursor &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:base</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:number</span>
  <span style="color: #83EA83; font-weight: bold;">:number</span> <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:number</span>
  <span style="color: #83EA83; font-weight: bold;">:base</span>
  divmod <span style="color: #FF4C4C; font-weight: bold;">&gt;:mod</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:div</span>
  <span style="color: #83EA83; font-weight: bold;">:mod</span> <span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #ffffff; font-weight: bold;">less-than?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:mod</span> number<span style="color: #b0b1a3;">-&gt;</span>digit-byte
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #83EA83; font-weight: bold;">:mod</span> number<span style="color: #b0b1a3;">-&gt;</span>latin-byte
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span>
  set-byte
  <span style="color: #83EA83; font-weight: bold;">:div</span>
  <span style="color: #83EA83; font-weight: bold;">:base</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> add1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">.#</span>
  <span style="color: #FF8888;">&lt;&lt; integer, base -- &gt;&gt;</span>
  over <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop .i
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">36</span> <span style="color: #ffffff; font-weight: bold;">greater-than?</span>
  over <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #ffffff; font-weight: bold;">less-than?</span>
  or <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (.#) the base "</span> .s .i <span style="color: #e6db74;">" is not valid to write a number"</span> .s .l
    <span style="color: #e6db74;">"  a base should in between 2 and 36 includingly"</span> .s .l
    <span style="color: #e6db74;">"  the integer to be written is "</span> .s .i .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup .i
  <span style="color: #e6db74;">"#"</span> .s
  over <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    swap negate swap
    <span style="color: #e6db74;">"-"</span> .s
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">128</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  .#,loop <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:buffer</span> sub
  string-reverse! .s
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org8640eb0" class="outline-4">
<h4 id="org8640eb0">.#2 .#8 .#16</h4>
<div class="outline-text-4" id="text-org8640eb0">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">.#2</span>  <span style="color: #fd971f; font-weight: bold;">2</span>  .# <span style="color: #e6db74;">" "</span> .s <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">.#8</span>  <span style="color: #fd971f; font-weight: bold;">8</span>  .# <span style="color: #e6db74;">" "</span> .s <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">.#16</span> <span style="color: #fd971f; font-weight: bold;">16</span> .# <span style="color: #e6db74;">" "</span> .s <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org558d28a" class="outline-4">
<h4 id="org558d28a"><span class="done test">test</span> .#</h4>
<div class="outline-text-4" id="text-org558d28a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) .#"</span> .s .l
  .s .l
  <span style="color: #fd971f; font-weight: bold;">0</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">111</span>        <span style="color: #fd971f; font-weight: bold;">0</span>  .# .l
  <span style="color: #FF8888;">&lt;&lt; error</span>
<span style="color: #FF8888;">  1#111        1  .# .l</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">10</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">123</span>       <span style="color: #fd971f; font-weight: bold;">10</span> .# .l
  <span style="color: #fd971f; font-weight: bold;">10</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">0</span>         <span style="color: #fd971f; font-weight: bold;">10</span> .# .l
  <span style="color: #fd971f; font-weight: bold;">2</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">1000</span>       <span style="color: #fd971f; font-weight: bold;">2</span>  .# .l
  <span style="color: #fd971f; font-weight: bold;">2</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">1111_1111</span>  <span style="color: #fd971f; font-weight: bold;">2</span>  .# .l
  <span style="color: #fd971f; font-weight: bold;">16</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">f_f</span>       <span style="color: #fd971f; font-weight: bold;">16</span> .# .l
  <span style="color: #fd971f; font-weight: bold;">36</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">zzzz</span>      <span style="color: #fd971f; font-weight: bold;">36</span> .# .l

  <span style="color: #fd971f; font-weight: bold;">2</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">1111_1111</span>  .#2  .l
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">123</span>        .#8  .l
  <span style="color: #fd971f; font-weight: bold;">16</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">fff</span>       .#16 .l
<span style="color: #ffff00; font-weight: bold;">;</span> dup2 <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org14dd7a7" class="outline-3">
<h3 id="org14dd7a7">init,syntax-rule-set:basic-REPL</h3>
<div class="outline-text-3" id="text-org14dd7a7">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">init,syntax-rule-set:basic-REPL</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
  dup <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">integer-string?</span> <span style="color: #f92672; font-weight: bold;">jo</span> string<span style="color: #b0b1a3;">-&gt;</span>integer <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
      <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span> <span style="color: #f92672; font-weight: bold;">jo</span> base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
<span style="color: #ffffff; font-weight: bold;">init,syntax-rule-set:</span>basic-REPL
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf93fd00" class="outline-3">
<h3 id="orgf93fd00"><span class="done test">test</span> REPL</h3>
<div class="outline-text-3" id="text-orgf93fd00">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) REPL"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">0</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">111</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span>

  <span style="color: #fd971f; font-weight: bold;">1</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">111</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span> and

  <span style="color: #fd971f; font-weight: bold;">10</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">123</span>
  _1_0__#_1__2_3_
  <span style="color: #ffffff; font-weight: bold;">equal?</span> and

  _1_0__#_1__2_3_
  <span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">3</span> mul
  <span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">2</span> mul add
  <span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span> and

  <span style="color: #fd971f; font-weight: bold;">2</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">1000</span>
  <span style="color: #fd971f; font-weight: bold;">2</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">_1000_</span>
  <span style="color: #ffffff; font-weight: bold;">equal?</span> and

  <span style="color: #fd971f; font-weight: bold;">2</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">_1000_</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">0</span> mul
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">0</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">0</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">3</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span> and

  <span style="color: #fd971f; font-weight: bold;">2</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">1111_1111</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">3</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">4</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">5</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">6</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">7</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span> and

  <span style="color: #fd971f; font-weight: bold;">16</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">f_f</span>
  <span style="color: #fd971f; font-weight: bold;">16</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">15</span> mul
  <span style="color: #fd971f; font-weight: bold;">16</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">15</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span> and

  <span style="color: #fd971f; font-weight: bold;">100</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">111</span>
  <span style="color: #fd971f; font-weight: bold;">100</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul
  <span style="color: #fd971f; font-weight: bold;">100</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #fd971f; font-weight: bold;">100</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">1</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span> and

  <span style="color: #fd971f; font-weight: bold;">64</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">zzz</span>
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul add
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span> and

  <span style="color: #fd971f; font-weight: bold;">36</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">zzzz</span>
  <span style="color: #fd971f; font-weight: bold;">36</span> <span style="color: #fd971f; font-weight: bold;">0</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul
  <span style="color: #fd971f; font-weight: bold;">36</span> <span style="color: #fd971f; font-weight: bold;">1</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul add
  <span style="color: #fd971f; font-weight: bold;">36</span> <span style="color: #fd971f; font-weight: bold;">2</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul add
  <span style="color: #fd971f; font-weight: bold;">36</span> <span style="color: #fd971f; font-weight: bold;">3</span> power <span style="color: #fd971f; font-weight: bold;">35</span> mul add
  <span style="color: #ffffff; font-weight: bold;">equal?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org6657aae" class="outline-2">
<h2 id="org6657aae">jojo-compiler</h2>
<div class="outline-text-2" id="text-org6657aae">
</div><div id="outline-container-orgb429234" class="outline-3">
<h3 id="orgb429234">jojo-compiler,dispatch-word&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></h3>
<div class="outline-text-3" id="text-orgb429234">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler,dispatch-word</span>
  <span style="color: #FF8888;">&lt;&lt; jo, string[address, length], word[address, length] --</span>
<span style="color: #FF8888;">     jo, string[address, length] &gt;&gt;</span>
  dup2 find-syntax <span style="color: #f92672; font-weight: bold;">if</span>
    apply
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 name-hash-table,find-jo <span style="color: #f92672; font-weight: bold;">if</span>
    xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x drop2
    jojo-area,stay
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (jojo-compiler) meets undefined word : "</span> .s .s .l
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>delete-last-record
  <span style="color: #fd971f; font-weight: bold;">'jojo-compiler,dispatch-word,fail</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org225f528" class="outline-3">
<h3 id="org225f528">jojo-compiler,dispatch-word,fail</h3>
<div class="outline-text-3" id="text-org225f528">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler,dispatch-word,fail</span>
  <span style="color: #e6db74;">"* (jojo-compiler,dispatch-word,fail)"</span> .s .l
  drop-syntax-stack
  action,reset-the-stack
  <span style="color: #FF8888;">&lt;&lt; scope-stack-pointer -- &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span> set
  <span style="color: #fd971f; font-weight: bold;">'undo-jojo-compiler</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5b771d8" class="outline-3">
<h3 id="org5b771d8">jojo-compiler&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></h3>
<div class="outline-text-3" id="text-org5b771d8">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler,loop</span>
  <span style="color: #FF8888;">&lt;&lt; jo, string[address, length] -- &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>xx
  <span style="color: #ffffff; font-weight: bold;">string:</span>word
  jojo-compiler,dispatch-word
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler</span>
  <span style="color: #FF8888;">&lt;&lt; jo, string[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>

  <span style="color: #FF8888;">&lt;&lt; this is an ad hoc</span>
<span style="color: #FF8888;">  &gt;&gt;</span> local-variable-table,clear

  <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:scope-stack-pointer</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #83EA83; font-weight: bold;">:scope-stack-pointer</span> offset-record,set-name
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #83EA83; font-weight: bold;">:scope-stack-pointer</span> offset-record,set-offset
  <span style="color: #fd971f; font-weight: bold;">scope-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span> add-set

  <span style="color: #83EA83; font-weight: bold;">:scope-stack-pointer</span>

  <span style="color: #f92672; font-weight: bold;">jo</span> jojo-compiler,dispatch-word,fail
  <span style="color: #fd971f; font-weight: bold;">'jojo-compiler,dispatch-word,fail</span> <span style="color: #1ef15f; font-weight: bold;">await</span>

  <span style="color: #fd971f; font-weight: bold;">jojo-compiler:*syntax-rule-set*</span> push-syntax-stack
  <span style="color: #83EA83; font-weight: bold;">:jo</span> <span style="color: #5CDD5C; font-weight: bold;">::string</span> jojo-compiler,loop
  drop-syntax-stack

  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span> set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgbf7b64d" class="outline-2">
<h2 id="orgbf7b64d">define-function</h2>
<div class="outline-text-2" id="text-orgbf7b64d">
</div><div id="outline-container-orgd956530" class="outline-3">
<h3 id="orgd956530">init,name-hash-table,by-link</h3>
<div class="outline-text-3" id="text-orgd956530">
<ul class="org-ul">
<li><p>the function should be evaled right after</p><p>(define-function) is redefined</p></li>
<li><p>be ware of</p><p>the interface of (name-hash-table,search)</p></li>
<li><p>I simply implement it as a recursive function</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">init,name-hash-table,by-link</span>
  <span style="color: #FF8888;">&lt;&lt; link -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:link</span>
  <span style="color: #83EA83; font-weight: bold;">:link</span> <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:link</span> link<span style="color: #b0b1a3;">-&gt;</span>next-link <span style="color: #f92672; font-weight: bold;">recur</span>
  <span style="color: #83EA83; font-weight: bold;">:link</span> name-hash-table,record-jo,by-link
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orga96cf16" class="outline-3">
<h3 id="orga96cf16">n-string-&gt;buffer!</h3>
<div class="outline-text-3" id="text-orga96cf16">
<ul class="org-ul">
<li><p>this function return length</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">n-string-&gt;buffer!,loop</span>
  <span style="color: #FF8888;">&lt;&lt; string-1[address, length],</span>
<span style="color: #FF8888;">     ...</span>
<span style="color: #FF8888;">     string-2[address, length],</span>
<span style="color: #FF8888;">     buffer, n, cursor</span>
<span style="color: #FF8888;">     -- length &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:n</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:n</span> <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:buffer</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:buffer</span> sub
    string-reverse!
    swap drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #83EA83; font-weight: bold;">:buffer</span>
    <span style="color: #83EA83; font-weight: bold;">:n</span> sub1
    <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    <span style="color: #00ffff; font-weight: bold;">loop</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 add sub1 get-byte <span style="color: #83EA83; font-weight: bold;">:cursor</span> set-byte
  sub1
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:n</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> add1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">n-string-&gt;buffer!</span>
  <span style="color: #FF8888;">&lt;&lt; string-1[address, length],</span>
<span style="color: #FF8888;">     ...</span>
<span style="color: #FF8888;">     string-2[address, length],</span>
<span style="color: #FF8888;">     buffer, n</span>
<span style="color: #FF8888;">     -- length &gt;&gt;</span>
  over n-string<span style="color: #b0b1a3;">-&gt;</span>buffer!,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgbf5bca7" class="outline-3">
<h3 id="orgbf5bca7"><span class="done test">test</span> n-string-&gt;buffer!</h3>
<div class="outline-text-3" id="text-orgbf5bca7">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*test,buffer*</span>
  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-variable</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) n-string-&gt;buffer!"</span> .s .l
  <span style="color: #e6db74;">"/home"</span>
  <span style="color: #e6db74;">"/xyh"</span>
  <span style="color: #e6db74;">"/cicada"</span>
  <span style="color: #fd971f; font-weight: bold;">*test,buffer*</span> <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #fd971f; font-weight: bold;">*test,buffer*</span> swap
  <span style="color: #e6db74;">"/home/xyh/cicada"</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org11561b7" class="outline-3">
<h3 id="org11561b7">undo-jojo-compiler</h3>
<div class="outline-text-3" id="text-org11561b7">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-jojo-compiler</span>
  action,reset-the-stack
  <span style="color: #FF8888;">&lt;&lt; *string-area,current-free-address*</span>
<span style="color: #FF8888;">     *jojo-area,current-free-address*</span>
<span style="color: #FF8888;">     string[address, length] &gt;&gt;</span>
  <span style="color: #e6db74;">"  the following jojo is not made :"</span> .s .l
  <span style="color: #e6db74;">":"</span> .s
  .s .l
  <span style="color: #e6db74;">";"</span> .s .l
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span> set
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*string-area,current-free-address*</span> set
  drop-syntax-stack
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgca99faf" class="outline-3">
<h3 id="orgca99faf">define-function&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></h3>
<div class="outline-text-3" id="text-orgca99faf">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">define-function</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*string-area,current-free-address*</span> xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x
  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span> xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x
  <span style="color: #FF8888;">&lt;&lt; *string-area,current-free-address*</span>
<span style="color: #FF8888;">     *jojo-area,current-free-address*</span>
<span style="color: #FF8888;">     string[address, length] &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> undo-jojo-compiler
  <span style="color: #fd971f; font-weight: bold;">'undo-jojo-compiler</span> <span style="color: #1ef15f; font-weight: bold;">await</span>

  dup2 <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>

  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #dc322f; font-weight: bold;">&gt;::body</span>

  <span style="color: #fd971f; font-weight: bold;">*explainer,function*</span> <span style="color: #fd971f; font-weight: bold;">0</span>
  make-jo-head <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>

  <span style="color: #83EA83; font-weight: bold;">:jo</span>
  <span style="color: #5CDD5C; font-weight: bold;">::name</span> string<span style="color: #b0b1a3;">-&gt;</span>name
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>record-jo

  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:old-address</span>

  <span style="color: #83EA83; font-weight: bold;">:jo</span> <span style="color: #5CDD5C; font-weight: bold;">::body</span> jojo-compiler

  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
  <span style="color: #83EA83; font-weight: bold;">:old-address</span> sub <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div
  <span style="color: #83EA83; font-weight: bold;">:jo</span> jo,set-length

  drop2
  drop
  drop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgdddc6fb" class="outline-3">
<h3 id="orgdddc6fb"><span class="done test">test</span> function</h3>
<div class="outline-text-3" id="text-orgdddc6fb">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">k</span> <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">3</span> add add . <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
k

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">k</span> <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">3</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
k add add .

<span style="color: #FF8888;">&lt;&lt; error &gt;&gt;</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">k</span> no <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org7678210" class="outline-2">
<h2 id="org7678210"><b>to use the new naming mechanism</b></h2>
<div class="outline-text-2" id="text-org7678210">
</div><div id="outline-container-orga43f894" class="outline-3">
<h3 id="orga43f894"><span class="todo note">note</span> </h3>
<div class="outline-text-3" id="text-orga43f894">
<ul class="org-ul">
<li><p>這裏的函數需要處理 鏈 中的重複定義的 珠</p><p>重複定義者 只有很少的幾個</p><p>一是 jojo-compiler 以及相關的</p><p>一是 define-function</p></li></ul>
</div>
</div>

<div id="outline-container-org972c082" class="outline-3">
<h3 id="org972c082">switch</h3>
<div class="outline-text-3" id="text-org972c082">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">*link*</span> init,name-hash-table,by-link
basic-REPL
</pre>
</div>
</div>
</div>
</div>


<div id="outline-container-orgd30e25a" class="outline-2">
<h2 id="orgd30e25a">fix syntax about local-variable</h2>
<div class="outline-text-2" id="text-orgd30e25a">
</div><div id="outline-container-org2a7906d" class="outline-3">
<h3 id="org2a7906d">jojo-compiler-syntax:local-variable-get&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></h3>
<div class="outline-text-3" id="text-org2a7906d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:local-variable-get</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], word[address, length] --</span>
<span style="color: #FF8888;">     string[address, length] &gt;&gt;</span>
  dup2 string<span style="color: #b0b1a3;">-&gt;</span>name <span style="color: #ffffff; font-weight: bold;">scope-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #f92672; font-weight: bold;">jo</span> instruction,local-variable,n-get
      jojo-area,stay
    <span style="color: #FF8888;">&lt;&lt; offset &gt;&gt;</span>
    offset-record,get-offset
      jojo-area,stay
    <span style="color: #FF8888;">&lt;&lt; number &gt;&gt;</span>
    count-front-colon
      jojo-area,stay
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (jojo-compiler-syntax:local-variable-get)"</span> .s .l
  <span style="color: #e6db74;">"  local-variable not bound : "</span> .s
     .s .l
  <span style="color: #fd971f; font-weight: bold;">'undo-jojo-compiler</span> <span style="color: #1ef15f; font-weight: bold;">await</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgcf52374" class="outline-3">
<h3 id="orgcf52374">jojo-compiler-syntax:local-variable-set&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></h3>
<div class="outline-text-3" id="text-orgcf52374">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:local-variable-set</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], word[address, length] --</span>
<span style="color: #FF8888;">     string[address, length] &gt;&gt;</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte-tail
  <span style="color: #dc322f; font-weight: bold;">&gt;::local-variable-name</span>
  <span style="color: #5CDD5C; font-weight: bold;">::local-variable-name</span> count-front-colon <span style="color: #FF4C4C; font-weight: bold;">&gt;:number</span>
  <span style="color: #5CDD5C; font-weight: bold;">::local-variable-name</span> string<span style="color: #b0b1a3;">-&gt;</span>name <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>

  <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #ffffff; font-weight: bold;">scope-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #f92672; font-weight: bold;">jo</span> instruction,local-variable,n-set
      jojo-area,stay
    <span style="color: #FF8888;">&lt;&lt; offset &gt;&gt;</span>
    offset-record,get-offset
      jojo-area,stay
    <span style="color: #83EA83; font-weight: bold;">:number</span>
      jojo-area,stay
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #ffffff; font-weight: bold;">scope-stack:</span>get-current-offset <span style="color: #FF4C4C; font-weight: bold;">&gt;:current-offset</span>
  <span style="color: #83EA83; font-weight: bold;">:current-offset</span>
  <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span>
  offset-record,set-offset
  <span style="color: #83EA83; font-weight: bold;">:name</span>
  <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span>
  offset-record,set-name
  <span style="color: #fd971f; font-weight: bold;">scope-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span> add-set

  <span style="color: #f92672; font-weight: bold;">jo</span> instruction,literal
    jojo-area,stay
  <span style="color: #83EA83; font-weight: bold;">:number</span>
    jojo-area,stay
  <span style="color: #f92672; font-weight: bold;">jo</span> allocate-local-variable
    jojo-area,stay

  <span style="color: #f92672; font-weight: bold;">jo</span> instruction,local-variable,n-set
    jojo-area,stay
  <span style="color: #83EA83; font-weight: bold;">:current-offset</span>
    jojo-area,stay
  <span style="color: #83EA83; font-weight: bold;">:number</span>
    jojo-area,stay
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgec5d26d" class="outline-3">
<h3 id="orgec5d26d">jojo-compiler-syntax:if&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></h3>
<div class="outline-text-3" id="text-orgec5d26d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:if</span>
  <span style="color: #FF8888;">&lt;&lt; jo, string[address, length], literal-word:if --</span>
<span style="color: #FF8888;">     scope-stack-pointer,</span>
<span style="color: #FF8888;">     address,</span>
<span style="color: #FF8888;">     jo, string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>

  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">instruction,false?</span>branch
    jojo-area,stay

  <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span>
  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
  <span style="color: #83EA83; font-weight: bold;">:jo</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span>

  <span style="color: #fd971f; font-weight: bold;">0</span> jojo-area,stay
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org3f3470d" class="outline-3">
<h3 id="org3f3470d">jojo-compiler-syntax:else&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></h3>
<div class="outline-text-3" id="text-org3f3470d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:else</span>
  <span style="color: #FF8888;">&lt;&lt; scope-stack-pointer,</span>
<span style="color: #FF8888;">     address,</span>
<span style="color: #FF8888;">     jo, string[address, length], literal-word:else --</span>
<span style="color: #FF8888;">     scope-stack-pointer,</span>
<span style="color: #FF8888;">     address,</span>
<span style="color: #FF8888;">     jo, string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:scope-stack-pointer</span>

  <span style="color: #83EA83; font-weight: bold;">:scope-stack-pointer</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span> set

  <span style="color: #f92672; font-weight: bold;">jo</span> instruction,branch
    jojo-area,stay

  <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span>
  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
  <span style="color: #83EA83; font-weight: bold;">:jo</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span>

  <span style="color: #fd971f; font-weight: bold;">0</span> jojo-area,stay

  <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  set offset of (instruction,false?branch)</span>
<span style="color: #FF8888;">  over (instruction,branch) and its offset</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span> <span style="color: #83EA83; font-weight: bold;">:address</span> sub
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div
  <span style="color: #83EA83; font-weight: bold;">:address</span> set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org412be2d" class="outline-3">
<h3 id="org412be2d">jojo-compiler-syntax:then&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></h3>
<div class="outline-text-3" id="text-org412be2d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:then</span>
  <span style="color: #FF8888;">&lt;&lt; scope-stack-pointer,</span>
<span style="color: #FF8888;">     address,</span>
<span style="color: #FF8888;">     jo, string[address, length], literal-word:then --</span>
<span style="color: #FF8888;">     jo, string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:scope-stack-pointer</span>

  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span> <span style="color: #83EA83; font-weight: bold;">:address</span> sub
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div
  <span style="color: #83EA83; font-weight: bold;">:address</span> set

  <span style="color: #83EA83; font-weight: bold;">:jo</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgda46675" class="outline-3">
<h3 id="orgda46675">more,syntax-rule-set:jojo-compiler</h3>
<div class="outline-text-3" id="text-orgda46675">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">more,syntax-rule-set:jojo-compiler</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">jojo-compiler:*syntax-rule-set*</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">local-variable-get-word?</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>local-variable-get
  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #fd971f; font-weight: bold;">jojo-compiler:*syntax-rule-set*</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">local-variable-set-word?</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>local-variable-set
  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #fd971f; font-weight: bold;">jojo-compiler:*syntax-rule-set*</span>
  dup <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>if?    <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>if    <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  dup <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>else?  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>else  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
      <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>then?  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>then  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
<span style="color: #ffffff; font-weight: bold;">more,syntax-rule-set:</span>jojo-compiler
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org85e223f" class="outline-2">
<h2 id="org85e223f">argument-stack:print</h2>
<div class="outline-text-2" id="text-org85e223f">
</div><div id="outline-container-org3d1ebce" class="outline-3">
<h3 id="org3d1ebce">argument-stack:print</h3>
<div class="outline-text-3" id="text-org3d1ebce">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">argument-stack:print,loop</span>
  <span style="color: #FF8888;">&lt;&lt; address, counter -- &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  sub1 swap
    dup get .
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
  swap
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">argument-stack:print</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  snapshot-the-stack-pointer
  <span style="color: #fd971f; font-weight: bold;">*the-stack-pointer-snapshot*</span>
  <span style="color: #fd971f; font-weight: bold;">*the-stack*</span> <span style="color: #ffffff; font-weight: bold;">greater-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">*the-stack*</span>   <span style="color: #FF8888;">&lt;&lt; address as return value &gt;&gt;</span>
    <span style="color: #fd971f; font-weight: bold;">*the-stack-pointer-snapshot*</span> <span style="color: #fd971f; font-weight: bold;">*the-stack*</span> sub
    <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div <span style="color: #FF8888;">&lt;&lt; counter as return value &gt;&gt;</span>
    <span style="color: #ffffff; font-weight: bold;">argument-stack:</span>print,loop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"below the stack "</span> .s
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf27605a" class="outline-3">
<h3 id="orgf27605a">argument-stack:pretty-print</h3>
<div class="outline-text-3" id="text-orgf27605a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">argument-stack:pretty-print</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  snapshot-the-stack-pointer
  .l
  <span style="color: #e6db74;">"  * "</span> .s
     <span style="color: #fd971f; font-weight: bold;">*the-stack-pointer-snapshot*</span>
     <span style="color: #fd971f; font-weight: bold;">*the-stack*</span> sub
     <span style="color: #FF8888;">&lt;&lt; ad hoc for the BUG of div &gt;&gt;</span>
     dup <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
       negate
       <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div
       negate
     <span style="color: #f92672; font-weight: bold;">else</span>
       <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div
     <span style="color: #f92672; font-weight: bold;">then</span>
     .i
  <span style="color: #e6db74;">" * "</span> .s
  <span style="color: #e6db74;">" -- "</span> .s
    <span style="color: #ffffff; font-weight: bold;">argument-stack:</span>print
  <span style="color: #e6db74;">"--"</span> .s
  .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgcbe67d4" class="outline-2">
<h2 id="orgcbe67d4">define-variable,with-tos</h2>
<div class="outline-text-2" id="text-orgcbe67d4">
</div><div id="outline-container-orga4caeae" class="outline-3">
<h3 id="orga4caeae">define-variable,with-tos&#xa0;&#xa0;&#xa0;<span class="tag"><span class="redefine">redefine</span></span></h3>
<div class="outline-text-3" id="text-orga4caeae">
<ul class="org-ul">
<li><p>not undo is needed for define-variable,with-tos</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #FF8888;">&lt;&lt; value, string[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:value</span>

  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>

  <span style="color: #fd971f; font-weight: bold;">*explainer,variable*</span> <span style="color: #fd971f; font-weight: bold;">0</span>
  make-jo-head <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>

  <span style="color: #83EA83; font-weight: bold;">:jo</span>
  <span style="color: #5CDD5C; font-weight: bold;">::name</span> string<span style="color: #b0b1a3;">-&gt;</span>name
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>record-jo

  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #83EA83; font-weight: bold;">:jo</span> jo,set-length

  <span style="color: #83EA83; font-weight: bold;">:value</span> jojo-area,stay
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5941ae1" class="outline-3">
<h3 id="org5941ae1"><span class="done test">test</span> define-variable,with-tos</h3>
<div class="outline-text-3" id="text-org5941ae1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">233</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*three*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">add-three</span>
  <span style="color: #fd971f; font-weight: bold;">*three*</span> add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">fix-*three*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*three*</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) define-variable,with-tos"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">1</span> add-three
  <span style="color: #fd971f; font-weight: bold;">234</span> <span style="color: #ffffff; font-weight: bold;">equal?</span>

  fix-<span style="color: #b0b1a3;">*</span>three<span style="color: #b0b1a3;">*</span> <span style="color: #fd971f; font-weight: bold;">1</span> add-three
  <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org3316834" class="outline-2">
<h2 id="org3316834">alias</h2>
<div class="outline-text-2" id="text-org3316834">
</div><div id="outline-container-orgf5e530c" class="outline-3">
<h3 id="orgf5e530c"><span class="todo note">note</span> </h3>
<div class="outline-text-3" id="text-orgf5e530c">
<ul class="org-ul">
<li><p>there shall be no way to know a naming is an alias or not</p></li></ul>
</div>
</div>

<div id="outline-container-orge40446b" class="outline-3">
<h3 id="orge40446b">alias</h3>
<div class="outline-text-3" id="text-orge40446b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">alias</span>
  <span style="color: #FF8888;">&lt;&lt; alias[address, length], name[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::name</span> <span style="color: #dc322f; font-weight: bold;">&gt;::alias</span>
  <span style="color: #5CDD5C; font-weight: bold;">::name</span> name-hash-table,find-jo <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (alias) fail"</span> .s .l
    <span style="color: #e6db74;">"  because can not find name in name-hash-table"</span> .s .l
    <span style="color: #e6db74;">"  alias : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::alias</span> .s .l
    <span style="color: #e6db74;">"  name : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>
  <span style="color: #83EA83; font-weight: bold;">:jo</span>
  <span style="color: #5CDD5C; font-weight: bold;">::alias</span> string<span style="color: #b0b1a3;">-&gt;</span>name
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>record-jo
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd695edb" class="outline-3">
<h3 id="orgd695edb"><span class="done test">test</span> alias</h3>
<div class="outline-text-3" id="text-orgd695edb">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) alias"</span> .s .l
  <span style="color: #e6db74;">"adba"</span> <span style="color: #e6db74;">"add"</span> alias
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">2</span> adba
  <span style="color: #fd971f; font-weight: bold;">3</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>

<span style="color: #FF8888;">&lt;&lt; error</span>
<span style="color: #FF8888;">"ab" "ad" alias</span>
<span style="color: #FF8888;">&gt;&gt;</span>
</pre>
</div>
</div>
</div>
</div>


<div id="outline-container-orgfadaa30" class="outline-2">
<h2 id="orgfadaa30">jojo-compiler-syntax:square-bar</h2>
<div class="outline-text-2" id="text-orgfadaa30">
</div><div id="outline-container-orge4e8dfe" class="outline-3">
<h3 id="orge4e8dfe">string:find-word</h3>
<div class="outline-text-3" id="text-orge4e8dfe">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string:find-word</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], word[address, length]</span>
<span style="color: #FF8888;">     -- sub-string[address, length], true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  xx<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>xx <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2 drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  xx<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>xx <span style="color: #ffffff; font-weight: bold;">string:</span>word
  xx<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>xx <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>xx <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>xx
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org65622eb" class="outline-3">
<h3 id="org65622eb"><span class="done test">test</span> string:find-word</h3>
<div class="outline-text-3" id="text-org65622eb">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) string:find-word"</span> .s .l
  <span style="color: #e6db74;">"111 222 333"</span> <span style="color: #e6db74;">"222"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>find-word <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">" 222 333"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #fd971f; font-weight: bold;">false</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #e6db74;">"111 222 333"</span> <span style="color: #e6db74;">"444"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>find-word <span style="color: #f92672; font-weight: bold;">if</span>
    .l .s .l
    <span style="color: #fd971f; font-weight: bold;">false</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #fd971f; font-weight: bold;">true</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #e6db74;">"111 222 [] 333"</span> <span style="color: #e6db74;">"["</span> <span style="color: #ffffff; font-weight: bold;">string:</span>find-word <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">" [] 333"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #fd971f; font-weight: bold;">false</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org66265bb" class="outline-3">
<h3 id="org66265bb"><span class="todo note">note</span> side-effect</h3>
<div class="outline-text-3" id="text-org66265bb">
<ul class="org-ul">
<li><p>side-effect on function [unnamed or named] is actually not so needed</p><p>for function is mainly used to encode algorithm</p></li>
<li><p>but side-effect on function is always possible when needed</p></li></ul>
</div>
</div>

<div id="outline-container-orge3057ea" class="outline-3">
<h3 id="orge3057ea"><span class="todo note">note</span> scope of named-local-variable</h3>
<div class="outline-text-3" id="text-orge3057ea">
<ul class="org-ul">
<li><p>in named function or unnamed function</p><p>the scope of named-local-variable is linear</p></li></ul>
</div>
</div>

<div id="outline-container-orgfc2b7f" class="outline-3">
<h3 id="orgfc2b7f">literal-word:square-bar?</h3>
<div class="outline-text-3" id="text-orgfc2b7f">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">literal-word:square-bar?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  <span style="color: #e6db74;">"["</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgfe2f824" class="outline-3">
<h3 id="orgfe2f824">literal-word:square-ket?</h3>
<div class="outline-text-3" id="text-orgfe2f824">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">literal-word:square-ket?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  <span style="color: #e6db74;">"]"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org58f23f3" class="outline-3">
<h3 id="org58f23f3"><span class="todo note">note</span> memory usage</h3>
<div class="outline-text-3" id="text-org58f23f3">
<ul class="org-ul">
<li><p>for the array can be nested</p><p>we must allocate the memory in place</p><p>a branch is there helping us to achieve this</p></li>
<li><p><p></p><p>[dup drop end]</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></colgroup></p><p><thead></p><p><tr></p><p><th scope="col" class="org-left">branch</th></p><p></tr></p><p></p><p><tr></p><p><th scope="col" class="org-left">offset to jo</th></p><p></tr></p><p></thead></p><p><tbody></p><p><tr></p><p><td class="org-left">&lt;jo-head&gt;</td></p><p></tr></p><p></tbody></p><p><tbody></p><p><tr></p><p><td class="org-left">dup</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">drop</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">end</td></p><p></tr></p><p></tbody></p><p><tbody></p><p><tr></p><p><td class="org-left">literal</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">address of the jo</td></p><p></tr></p><p></tbody></p><p></table></p></li></ul>
</div>
</div>

<div id="outline-container-orgdc871da" class="outline-3">
<h3 id="orgdc871da">jojo-compiler-syntax:square-bar</h3>
<div class="outline-text-3" id="text-orgdc871da">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:square-bar</span>
  <span style="color: #FF8888;">&lt;&lt; jo, string[address, length], literal-word:square-bar --</span>
<span style="color: #FF8888;">     scope-stack-pointer,</span>
<span style="color: #FF8888;">     offset-address,</span>
<span style="color: #FF8888;">     new-jo,</span>
<span style="color: #FF8888;">     jo, string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>

  <span style="color: #f92672; font-weight: bold;">jo</span> instruction,branch
    jojo-area,stay
  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:offset-address</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> jojo-area,stay

  <span style="color: #fd971f; font-weight: bold;">*explainer,function*</span> <span style="color: #fd971f; font-weight: bold;">0</span>
  make-jo-head <span style="color: #FF4C4C; font-weight: bold;">&gt;:new-jo</span>

  <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:scope-stack-pointer</span>
  <span style="color: #fd971f; font-weight: bold;">0</span>
  <span style="color: #83EA83; font-weight: bold;">:scope-stack-pointer</span>
  offset-record,set-name
  <span style="color: #fd971f; font-weight: bold;">0</span>
  <span style="color: #83EA83; font-weight: bold;">:scope-stack-pointer</span>
  offset-record,set-offset
  <span style="color: #fd971f; font-weight: bold;">scope-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span> add-set

  <span style="color: #83EA83; font-weight: bold;">:scope-stack-pointer</span>
  <span style="color: #83EA83; font-weight: bold;">:offset-address</span>
  <span style="color: #83EA83; font-weight: bold;">:new-jo</span>
  <span style="color: #83EA83; font-weight: bold;">:jo</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgec67c3e" class="outline-3">
<h3 id="orgec67c3e">jojo-compiler-syntax:square-ket</h3>
<div class="outline-text-3" id="text-orgec67c3e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:square-ket</span>
  <span style="color: #FF8888;">&lt;&lt; scope-stack-pointer,</span>
<span style="color: #FF8888;">     offset-address,</span>
<span style="color: #FF8888;">     new-jo,</span>
<span style="color: #FF8888;">     jo, string[address, length], literal-word:square-ket --</span>
<span style="color: #FF8888;">     jo, string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:new-jo</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:offset-address</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:scope-stack-pointer</span>

  <span style="color: #83EA83; font-weight: bold;">:scope-stack-pointer</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">scope-stack:*pointer*</span> set

  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
  <span style="color: #83EA83; font-weight: bold;">:offset-address</span> sub
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div
  <span style="color: #83EA83; font-weight: bold;">:offset-address</span> set

  <span style="color: #f92672; font-weight: bold;">jo</span> instruction,literal
    jojo-area,stay
  <span style="color: #83EA83; font-weight: bold;">:new-jo</span>
    jojo-area,stay

  <span style="color: #83EA83; font-weight: bold;">:jo</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgafeb66" class="outline-3">
<h3 id="orgafeb66">more,syntax-rule-set:jojo-compiler</h3>
<div class="outline-text-3" id="text-orgafeb66">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">more,syntax-rule-set:jojo-compiler</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">jojo-compiler:*syntax-rule-set*</span>
  dup <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>square-bar? <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>square-bar <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
      <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>square-ket? <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>square-ket <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffffff; font-weight: bold;">more,syntax-rule-set:</span>jojo-compiler
</pre>
</div>
</div>
</div>

<div id="outline-container-org67bb6c0" class="outline-3">
<h3 id="org67bb6c0"><span class="done test">test</span> square-bar &amp; square-ket by factorial</h3>
<div class="outline-text-3" id="text-org67bb6c0">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">testing-square-bar</span>
  <span style="color: #93a8c6;">[</span><span style="color: #e6db74;">"testing square-bar &amp; square-ket"</span> <span style="color: #00ffff; font-weight: bold;">end</span><span style="color: #93a8c6;">]</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) square-bar &amp; square-ket"</span> .s .l
  testing-square-bar apply
  <span style="color: #e6db74;">"testing square-bar &amp; square-ket"</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">apply-factorial</span>
  <span style="color: #FF8888;">&lt;&lt; number -- number &gt;&gt;</span>
  <span style="color: #93a8c6;">[</span>dup
   <span style="color: #ffffff; font-weight: bold;">one?</span> <span style="color: #f92672; font-weight: bold;">if</span>
     <span style="color: #00ffff; font-weight: bold;">end</span>
   <span style="color: #f92672; font-weight: bold;">then</span>
   dup sub1 <span style="color: #f92672; font-weight: bold;">recur</span>
   mul
   <span style="color: #00ffff; font-weight: bold;">end</span><span style="color: #93a8c6;">]</span> apply
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) square-bar &amp; square-ket by factorial"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">1</span> apply-factorial <span style="color: #fd971f; font-weight: bold;">1</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> apply-factorial <span style="color: #fd971f; font-weight: bold;">2</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">3</span> apply-factorial <span style="color: #fd971f; font-weight: bold;">6</span>   <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">4</span> apply-factorial <span style="color: #fd971f; font-weight: bold;">24</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">5</span> apply-factorial <span style="color: #fd971f; font-weight: bold;">120</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and
  <span style="color: #fd971f; font-weight: bold;">6</span> apply-factorial <span style="color: #fd971f; font-weight: bold;">720</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org2a57a60" class="outline-2">
<h2 id="org2a57a60">jojo-compiler-syntax:name</h2>
<div class="outline-text-2" id="text-org2a57a60">
</div><div id="outline-container-org341e41f" class="outline-3">
<h3 id="org341e41f">jojo-compiler-syntax:name</h3>
<div class="outline-text-3" id="text-org341e41f">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:name</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], word[address, length] --</span>
<span style="color: #FF8888;">     string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #f92672; font-weight: bold;">jo</span> instruction,literal
    jojo-area,stay
  dup2
  <span style="color: #ffffff; font-weight: bold;">string:</span>word
  string<span style="color: #b0b1a3;">-&gt;</span>name
    jojo-area,stay
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org224ce68" class="outline-3">
<h3 id="org224ce68">more,syntax-rule-set:jojo-compiler</h3>
<div class="outline-text-3" id="text-org224ce68">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">more,syntax-rule-set:jojo-compiler</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">jojo-compiler:*syntax-rule-set*</span>
  <span style="color: #93a8c6;">[</span><span style="color: #e6db74;">"name"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #00ffff; font-weight: bold;">end</span><span style="color: #93a8c6;">]</span> <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>name
  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
<span style="color: #ffffff; font-weight: bold;">more,syntax-rule-set:</span>jojo-compiler
</pre>
</div>
</div>
</div>

<div id="outline-container-org18a85ca" class="outline-3">
<h3 id="org18a85ca"><span class="done test">test</span> jojo-compiler-syntax:name</h3>
<div class="outline-text-3" id="text-org18a85ca">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:name,test</span>
  <span style="color: #FF8888;">&lt;&lt; -- string[address, length] &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">name</span> test-name name<span style="color: #b0b1a3;">-&gt;</span>string
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) jojo-compiler-syntax:name"</span> .s .l
  <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>name,test
  <span style="color: #e6db74;">"test-name"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org1d60b89" class="outline-2">
<h2 id="org1d60b89">jojo-compiler-syntax:base#wild-integer-string</h2>
<div class="outline-text-2" id="text-org1d60b89">
</div><div id="outline-container-org10177a4" class="outline-3">
<h3 id="org10177a4">jojo-compiler-syntax:base#wild-integer-string</h3>
<div class="outline-text-3" id="text-org10177a4">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">jojo-compiler-syntax:base#wild-integer-string</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], word[address, length] --</span>
<span style="color: #FF8888;">     string[address, length] &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> instruction,literal
    jojo-area,stay
  base#wild-integer-string<span style="color: #b0b1a3;">-&gt;</span>integer
    jojo-area,stay
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4c0a5bc" class="outline-3">
<h3 id="org4c0a5bc">more,syntax-rule-set:jojo-compiler</h3>
<div class="outline-text-3" id="text-org4c0a5bc">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">more,syntax-rule-set:jojo-compiler</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">jojo-compiler:*syntax-rule-set*</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">base#wild-integer-string?</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">jojo-compiler-syntax:</span>base#wild-integer-string
  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
<span style="color: #ffffff; font-weight: bold;">more,syntax-rule-set:</span>jojo-compiler
</pre>
</div>
</div>
</div>
</div>


<div id="outline-container-org83ca3d6" class="outline-2">
<h2 id="org83ca3d6">word-interpreter-syntax</h2>
<div class="outline-text-2" id="text-org83ca3d6">
</div><div id="outline-container-org243a93b" class="outline-3">
<h3 id="org243a93b">jo&#xa0;&#xa0;&#xa0;<span class="tag"><span class="syntax">syntax</span></span></h3>
<div class="outline-text-3" id="text-org243a93b">
</div><div id="outline-container-org82a0346" class="outline-4">
<h4 id="org82a0346">word-interpreter-syntax:jo</h4>
<div class="outline-text-4" id="text-org82a0346">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:jo</span>
  <span style="color: #FF8888;">&lt;&lt; literal-word:jo -- jo &gt;&gt;</span>
  drop2
  read-word
  <span style="color: #dc322f; font-weight: bold;">&gt;::word</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> name-hash-table,find-jo <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (word-interpreter-syntax:jo) meet undefined word after jo : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::word</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb303182" class="outline-4">
<h4 id="orgb303182">more,syntax-rule-set:basic-REPL</h4>
<div class="outline-text-4" id="text-orgb303182">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">more,syntax-rule-set:basic-REPL</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
  <span style="color: #93a8c6;">[</span><span style="color: #e6db74;">"bye"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #00ffff; font-weight: bold;">end</span><span style="color: #93a8c6;">]</span> <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>bye
  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
  <span style="color: #93a8c6;">[</span><span style="color: #e6db74;">"jo"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #00ffff; font-weight: bold;">end</span><span style="color: #93a8c6;">]</span> <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>jo
  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
<span style="color: #ffffff; font-weight: bold;">more,syntax-rule-set:</span>basic-REPL
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgb224a19" class="outline-3">
<h3 id="orgb224a19">if &amp; else &amp; then&#xa0;&#xa0;&#xa0;<span class="tag"><span class="syntax">syntax</span></span></h3>
<div class="outline-text-3" id="text-orgb224a19">
</div><div id="outline-container-org788b15a" class="outline-4">
<h4 id="org788b15a"><span class="todo note">note</span> ending jo</h4>
<div class="outline-text-4" id="text-org788b15a">
<ul class="org-ul">
<li><p>you do not need to use ending jo</p><p>in code blocks formed by if else then</p><p>because in a REPL</p><p>things are different from function body</p><p>and there is no such thing as</p><p>the end of a function body in the REPL</p></li></ul>
</div>
</div>

<div id="outline-container-org4acd4ab" class="outline-4">
<h4 id="org4acd4ab"><span class="todo note">note</span> (end) in REPL</h4>
<div class="outline-text-4" id="text-org4acd4ab">
<ul class="org-ul">
<li><p>when use (end) in REPL</p><p>nothing will happen</p><p>this is because (word-interpreter) calls (end)</p><p>and the jojo (word-interpreter) is pop out of return-stack</p><p>just like meet (end) in the function-body of (word-interpreter)</p></li></ul>
</div>
</div>

<div id="outline-container-org3a9e108" class="outline-4">
<h4 id="org3a9e108">word-interpreter-syntax:if,meet-true</h4>
<div class="outline-text-4" id="text-org3a9e108">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:if,meet-true,else</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  read-word
  <span style="color: #e6db74;">"then"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:if,meet-true</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  read-word
  dup2 <span style="color: #e6db74;">"then"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #e6db74;">"else"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>if,meet-true,else
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  word-interpreter
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org380d1d4" class="outline-4">
<h4 id="org380d1d4">word-interpreter-syntax:if,meet-false</h4>
<div class="outline-text-4" id="text-org380d1d4">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:if,meet-false,else</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  read-word
  dup2 <span style="color: #e6db74;">"then"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  word-interpreter
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:if,meet-false</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  read-word
  dup2 <span style="color: #e6db74;">"then"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #e6db74;">"else"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>if,meet-false,else
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop2
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org97874" class="outline-4">
<h4 id="org97874">word-interpreter-syntax:if</h4>
<div class="outline-text-4" id="text-org97874">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:if</span>
  <span style="color: #FF8888;">&lt;&lt; bool, literal-word:if -- &gt;&gt;</span>
  drop2 <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>if,meet-true
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>if,meet-false
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org7f82f8f" class="outline-4">
<h4 id="org7f82f8f">syntax-rule:add to syntax-rule-set:*word-interpreter*</h4>
<div class="outline-text-4" id="text-org7f82f8f">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>if? <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>if
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
</pre>
</div>
</div>
</div>

<div id="outline-container-org41d4034" class="outline-4">
<h4 id="org41d4034"><span class="done test">test</span> word-interpreter-syntax:if &amp; else &amp; then</h4>
<div class="outline-text-4" id="text-org41d4034">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) word-interpreter-syntax:if &amp; else &amp; then"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">1</span>
  <span style="color: #ffffff; font-weight: bold;">one?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">111</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">111</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>

  <span style="color: #fd971f; font-weight: bold;">0</span>
  <span style="color: #ffffff; font-weight: bold;">one?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">111</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #fd971f; font-weight: bold;">666</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">666</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org62f9985" class="outline-3">
<h3 id="org62f9985"><b>circular-string-area</b></h3>
<div class="outline-text-3" id="text-org62f9985">
</div><div id="outline-container-orgf313d26" class="outline-4">
<h4 id="orgf313d26"><span class="todo note">note</span> </h4>
<div class="outline-text-4" id="text-orgf313d26">
<ul class="org-ul">
<li><p>no length in the area anymore</p><p>[not like the string-area]</p></li>
<li><p>and ending each string here with a 0</p></li></ul>
</div>
</div>

<div id="outline-container-orgd8d0dd" class="outline-4">
<h4 id="orgd8d0dd">allocate-memory</h4>
<div class="outline-text-4" id="text-orgd8d0dd">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">1024</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*circular-string-area,size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>


<span style="color: #fd971f; font-weight: bold;">*circular-string-area,size*</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*circular-string-area*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*circular-string-area*</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgb7c6494" class="outline-3">
<h3 id="orgb7c6494">double-quote&#xa0;&#xa0;&#xa0;<span class="tag"><span class="syntax">syntax</span></span></h3>
<div class="outline-text-3" id="text-orgb7c6494">
</div><div id="outline-container-org550e862" class="outline-4">
<h4 id="org550e862">circular-string-area,stay</h4>
<div class="outline-text-4" id="text-org550e862">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">circular-string-area,stay</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span> add
  <span style="color: #fd971f; font-weight: bold;">*circular-string-area,size*</span> <span style="color: #fd971f; font-weight: bold;">*circular-string-area*</span> add
  <span style="color: #ffffff; font-weight: bold;">greater-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">*circular-string-area*</span>
    <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span> set
  <span style="color: #f92672; font-weight: bold;">then</span>
  tuck
  <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span>
  string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span>
  add-set
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span>
  set-byte
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span>
  add-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf08ee6f" class="outline-4">
<h4 id="orgf08ee6f">word-interpreter-syntax:double-quote</h4>
<div class="outline-text-4" id="text-orgf08ee6f">
<ul class="org-ul">
<li><p>in ASCII encode double-quote is 34</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:double-quote,loop</span>
  <span style="color: #FF8888;">&lt;&lt; cursor -- cursor &gt;&gt;</span>
  read-byte
  dup <span style="color: #fd971f; font-weight: bold;">34</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  over set-byte
  add1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:double-quote</span>
  <span style="color: #FF8888;">&lt;&lt; literal-word:double-quote -- string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #fd971f; font-weight: bold;">1024</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>double-quote,loop
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:buffer</span> sub dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  circular-string-area,stay
  <span style="color: #83EA83; font-weight: bold;">:address</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org67d73e" class="outline-4">
<h4 id="org67d73e">syntax-rule:add to syntax-rule-set:*word-interpreter*</h4>
<div class="outline-text-4" id="text-org67d73e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>double-quote? <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>double-quote
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
</pre>
</div>
</div>
</div>

<div id="outline-container-orge76615" class="outline-4">
<h4 id="orge76615"><span class="done test">test</span> word-interpreter-syntax:double-quote</h4>
<div class="outline-text-4" id="text-orge76615">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) word-interpreter-syntax:double-quote"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">1</span>
  <span style="color: #ffffff; font-weight: bold;">one?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"111"</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"111"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>

  <span style="color: #fd971f; font-weight: bold;">0</span>
  <span style="color: #ffffff; font-weight: bold;">one?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"111"</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"___"</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"___"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgc620ae1" class="outline-3">
<h3 id="orgc620ae1">address&#xa0;&#xa0;&#xa0;<span class="tag"><span class="syntax">syntax</span></span></h3>
<div class="outline-text-3" id="text-orgc620ae1">
</div><div id="outline-container-org923565e" class="outline-4">
<h4 id="org923565e">word-interpreter-syntax:address</h4>
<div class="outline-text-4" id="text-org923565e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:address</span>
  <span style="color: #FF8888;">&lt;&lt; literal-word:address -- address &gt;&gt;</span>
  drop2
  read-word
  <span style="color: #dc322f; font-weight: bold;">&gt;::word</span>

  <span style="color: #5CDD5C; font-weight: bold;">::word</span> name-hash-table,find-jo <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (word-interpreter-syntax:address) meet undefined word : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::word</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>
  <span style="color: #83EA83; font-weight: bold;">:jo</span> <span style="color: #ffffff; font-weight: bold;">variable-jo?</span> <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (word-interpreter-syntax:address) meet a not variable-jo : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::word</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:jo</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org95c79dd" class="outline-4">
<h4 id="org95c79dd">syntax-rule:add to syntax-rule-set:*word-interpreter*</h4>
<div class="outline-text-4" id="text-org95c79dd">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>address?
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>address
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc9a3bc" class="outline-4">
<h4 id="orgc9a3bc"><span class="done test">test</span> word-interpreter-syntax:address</h4>
<div class="outline-text-4" id="text-orgc9a3bc">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">0</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">word-interpreter-syntax:*testing-variable*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) word-interpreter-syntax:address"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">666</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">word-interpreter-syntax:*testing-variable*</span> set
  <span style="color: #fd971f; font-weight: bold;">word-interpreter-syntax:*testing-variable*</span>
  <span style="color: #fd971f; font-weight: bold;">666</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>

<span style="color: #FF8888;">&lt;&lt; error</span>
<span style="color: #FF8888;">address kkk</span>
<span style="color: #FF8888;">&gt;&gt;</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgade10e" class="outline-3">
<h3 id="orgade10e">literal-word:name?</h3>
<div class="outline-text-3" id="text-orgade10e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">literal-word:name?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  <span style="color: #e6db74;">"name"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org52d61f1" class="outline-3">
<h3 id="org52d61f1">name&#xa0;&#xa0;&#xa0;<span class="tag"><span class="syntax">syntax</span></span></h3>
<div class="outline-text-3" id="text-org52d61f1">
</div><div id="outline-container-org8e1627" class="outline-4">
<h4 id="org8e1627">word-interpreter-syntax:name</h4>
<div class="outline-text-4" id="text-org8e1627">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:name</span>
  <span style="color: #FF8888;">&lt;&lt; literal-word:name -- name &gt;&gt;</span>
  drop2
  read-word
  <span style="color: #dc322f; font-weight: bold;">&gt;::word</span>

  <span style="color: #5CDD5C; font-weight: bold;">::word</span> string<span style="color: #b0b1a3;">-&gt;</span>name
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5177ad6" class="outline-4">
<h4 id="org5177ad6">syntax-rule:add to syntax-rule-set:*word-interpreter*</h4>
<div class="outline-text-4" id="text-org5177ad6">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>name?
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>name
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
</pre>
</div>
</div>
</div>

<div id="outline-container-orgadde5e3" class="outline-4">
<h4 id="orgadde5e3"><span class="done test">test</span> word-interpreter-syntax:name</h4>
<div class="outline-text-4" id="text-orgadde5e3">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) word-interpreter-syntax:name"</span> .s .l
  <span style="color: #f92672; font-weight: bold;">name</span> add
  name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #e6db74;">"add"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #f92672; font-weight: bold;">name</span> <span style="color: #fd971f; font-weight: bold;">word-interpreter-syntax:*testing-variable*</span>
  name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #e6db74;">"word-interpreter-syntax:*testing-variable*"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #f92672; font-weight: bold;">name</span> kkk
  name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #e6db74;">"kkk"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org8951c5d" class="outline-3">
<h3 id="org8951c5d">quote</h3>
<div class="outline-text-3" id="text-org8951c5d">
</div><div id="outline-container-orgeec7cc5" class="outline-4">
<h4 id="orgeec7cc5">word-interpreter-syntax:quote</h4>
<div class="outline-text-4" id="text-orgeec7cc5">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:quote</span>
  <span style="color: #FF8888;">&lt;&lt; quote-word -- name &gt;&gt;</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte-tail string<span style="color: #b0b1a3;">-&gt;</span>name
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org3d4e28b" class="outline-4">
<h4 id="org3d4e28b">syntax-rule:add to syntax-rule-set:*word-interpreter*</h4>
<div class="outline-text-4" id="text-org3d4e28b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">quote-word?</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>quote
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
</pre>
</div>
</div>
</div>

<div id="outline-container-org385a17" class="outline-4">
<h4 id="org385a17"><span class="done test">test</span> word-interpreter-syntax:quote</h4>
<div class="outline-text-4" id="text-org385a17">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) word-interpreter-syntax:name"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">'add</span>
  name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #e6db74;">"add"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #fd971f; font-weight: bold;">'kkk</span>
  name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #e6db74;">"kkk"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>
</div>

<div id="outline-container-orga603b59" class="outline-2">
<h2 id="orga603b59"><b>a little test</b></h2>
<div class="outline-text-2" id="text-orga603b59">
</div><div id="outline-container-org392f184" class="outline-3">
<h3 id="org392f184">nested comment</h3>
<div class="outline-text-3" id="text-org392f184">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) nested comment in REPL"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #FF8888;">&lt;&lt; 2    3    4 &gt;&gt;</span> <span style="color: #fd971f; font-weight: bold;">5</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #FF8888;">&lt;&lt; 2 &lt;&lt; 3 &gt;&gt;</span> <span style="color: #fd971f; font-weight: bold;">4</span> &gt;&gt; <span style="color: #fd971f; font-weight: bold;">5</span>
  <span style="color: #fd971f; font-weight: bold;">5</span> <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> add
  <span style="color: #fd971f; font-weight: bold;">5</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> add
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> add <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">nested-comment-function-body</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #FF8888;">&lt;&lt; 2    3    4 &gt;&gt;</span> <span style="color: #fd971f; font-weight: bold;">5</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #FF8888;">&lt;&lt; 2 &lt;&lt; 3 &gt;&gt;</span> <span style="color: #fd971f; font-weight: bold;">4</span> &gt;&gt; <span style="color: #fd971f; font-weight: bold;">5</span>
  <span style="color: #fd971f; font-weight: bold;">5</span> <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> add
  <span style="color: #fd971f; font-weight: bold;">5</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> add
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> add <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) nested comment in function body"</span> .s .l
  nested-comment-function-body
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org9d06b2e" class="outline-3">
<h3 id="org9d06b2e">return structured value</h3>
<div class="outline-text-3" id="text-org9d06b2e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">callee</span>
  <span style="color: #FF8888;">&lt;&lt; -- string[address, length] &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-conjugate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #e6db74;">"(callee ^-^) "</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">caller</span>
  <span style="color: #FF8888;">&lt;&lt; -- string[address, length] &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #e6db74;">"(caller O.o) "</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #dc322f; font-weight: bold;">&gt;::caller-string-1</span>

  callee <span style="color: #dc322f; font-weight: bold;">&gt;::callee-string</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #e6db74;">"(caller o.O) "</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #dc322f; font-weight: bold;">&gt;::caller-string-2</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #5CDD5C; font-weight: bold;">::caller-string-1</span>
  <span style="color: #5CDD5C; font-weight: bold;">::callee-string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::caller-string-2</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) return structured value"</span> .s .l
  caller
  <span style="color: #e6db74;">"(caller O.o) (callee ^-^) (caller o.O) "</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>


<div id="outline-container-orgb283d9e" class="outline-2">
<h2 id="orgb283d9e">syntax-rule-set &amp; syntax-rule</h2>
<div class="outline-text-2" id="text-orgb283d9e">
</div><div id="outline-container-orgd55b758" class="outline-3">
<h3 id="orgd55b758"><span class="done test">test</span> endianness of n-get &amp; n-set</h3>
<div class="outline-text-3" id="text-orgd55b758">
<ul class="org-ul">
<li><p><p></p><p>big-endian is used</p><p>in memory</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">value-1</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">value-2</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">value-3</td></p><p></tr></p><p></tbody></p><p></table></p><p><p></p><p>on stack</p><p>&lt;&lt; value-1, value-2, value-3 &gt;&gt;</p><p></p></p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">3</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*t*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) endianness of n-get &amp; n-set"</span> .s .l
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">3</span> <span style="color: #fd971f; font-weight: bold;">*t*</span> <span style="color: #fd971f; font-weight: bold;">3</span> n-set
  <span style="color: #FF8888;">&lt;&lt; re-occur when geting through &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*t*</span> get
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">equal?</span>

  <span style="color: #fd971f; font-weight: bold;">*t*</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add get
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and

  <span style="color: #fd971f; font-weight: bold;">*t*</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add get
  <span style="color: #fd971f; font-weight: bold;">3</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>

  <span style="color: #fd971f; font-weight: bold;">*t*</span> <span style="color: #fd971f; font-weight: bold;">3</span> n-get
  <span style="color: #fd971f; font-weight: bold;">3</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org78b8814" class="outline-3">
<h3 id="org78b8814">syntax-rule-set:list</h3>
<div class="outline-text-3" id="text-org78b8814">
<ul class="org-ul">
<li><p>最後寫到規則集合裏的 被最先打印出來</p></li>
<li><p>下面的打印方式 看似有些不簡潔</p><p>是因爲 我還沒有 integer-&gt;string 這樣的函數</p><p>[因爲 沒有對字符串的動態內存管理]</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax-rule-set:list,loop</span>
  <span style="color: #FF8888;">&lt;&lt; syntax-rule-set: cursor, counter -- &gt;&gt;</span>
  xx<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>x <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"  * "</span> .s
  <span style="color: #e6db74;">"("</span> .s
  add1 dup .i
  <span style="color: #e6db74;">")"</span> .s .l
  swap
    dup <span style="color: #fd971f; font-weight: bold;">syntax-rule:*unit*</span> sub <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>get-predicate
    <span style="color: #e6db74;">"    "</span> .s jo,find-name <span style="color: #f92672; font-weight: bold;">if</span> name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #f92672; font-weight: bold;">else</span> <span style="color: #e6db74;">"  unnamed jo"</span> <span style="color: #f92672; font-weight: bold;">then</span> .s .l
    dup <span style="color: #fd971f; font-weight: bold;">syntax-rule:*unit*</span> sub <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>get-function
    <span style="color: #e6db74;">"    "</span> .s jo,find-name <span style="color: #f92672; font-weight: bold;">if</span> name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #f92672; font-weight: bold;">else</span> <span style="color: #e6db74;">"  unnamed jo"</span> <span style="color: #f92672; font-weight: bold;">then</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> sub <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> sub
  swap
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax-rule-set:list</span>
  <span style="color: #FF8888;">&lt;&lt; syntax-rule-set -- &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>get-border
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>list,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org8d8920e" class="outline-3">
<h3 id="org8d8920e">syntax-rule:sub</h3>
<div class="outline-text-3" id="text-org8d8920e">
<ul class="org-ul">
<li><p>firstly</p><p>in (syntax-rule:sub,loop)</p><p>cursor move from border down to address of syntax-rule-set</p><p>secondly</p><p>in (syntax-rule:sub,move)</p><p>cursor move from founded place up to border</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax-rule:sub,move-one</span>
  <span style="color: #FF8888;">&lt;&lt; cursor -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">2</span> n-get
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul sub
  <span style="color: #fd971f; font-weight: bold;">2</span> n-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax-rule:sub,move</span>
  <span style="color: #FF8888;">&lt;&lt; syntax-rule-set: cursor -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syntax-rule-set</span>
  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>get-border <span style="color: #FF4C4C; font-weight: bold;">&gt;:border</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:border</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:border</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul sub
    <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span>
    <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>set-border
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>sub,move-one
  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax-rule:sub,loop</span>
  <span style="color: #FF8888;">&lt;&lt; syntax-rule-set: syntax-rule[predicate, function], cursor -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::syntax-rule</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syntax-rule-set</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::syntax-rule</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">syntax-rule:*unit*</span> sub <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>get
  <span style="color: #ffffff; font-weight: bold;">equal2?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span> <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>sub,move
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span>
  <span style="color: #5CDD5C; font-weight: bold;">::syntax-rule</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul sub
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax-rule:sub</span>
  <span style="color: #FF8888;">&lt;&lt; syntax-rule-set: syntax-rule[predicate, function] -- &gt;&gt;</span>
  x<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>xx <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>get-border
  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>sub,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc118875" class="outline-3">
<h3 id="orgc118875"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-orgc118875">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>list

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>address?
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>address
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>double-quote?
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>double-quote
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>list

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>address?
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>address
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>sub

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>list

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>double-quote?
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>double-quote
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>sub

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>list
</pre>
</div>
</div>
</div>

<div id="outline-container-org4a8a27" class="outline-3">
<h3 id="org4a8a27">syntax-rule-set:mixin</h3>
<div class="outline-text-3" id="text-org4a8a27">
<ul class="org-ul">
<li><p>the order matters</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax-rule-set:mixin,loop</span>
  <span style="color: #FF8888;">&lt;&lt; base-syntax-rule-set: border, cursor -- &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>get <span style="color: #dc322f; font-weight: bold;">&gt;::syntax-rule</span>
  x<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>xx <span style="color: #5CDD5C; font-weight: bold;">::syntax-rule</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #fd971f; font-weight: bold;">syntax-rule:*unit*</span> add
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax-rule-set:mixin</span>
  <span style="color: #FF8888;">&lt;&lt; base-syntax-rule-set: syntax-rule-set -- &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>get-border swap
  <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>mixin,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org3d3f8bd" class="outline-3">
<h3 id="org3d3f8bd">syntax-rule-set:mixout</h3>
<div class="outline-text-3" id="text-org3d3f8bd">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax-rule-set:mixout,loop</span>
  <span style="color: #FF8888;">&lt;&lt; base-syntax-rule-set: border, cursor -- &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>get <span style="color: #dc322f; font-weight: bold;">&gt;::syntax-rule</span>
  x<span style="color: #b0b1a3;">|</span>over<span style="color: #b0b1a3;">|</span>xx <span style="color: #5CDD5C; font-weight: bold;">::syntax-rule</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>sub
  <span style="color: #fd971f; font-weight: bold;">syntax-rule:*unit*</span> add
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax-rule-set:mixout</span>
  <span style="color: #FF8888;">&lt;&lt; base-syntax-rule-set: syntax-rule-set -- &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>get-border swap
  <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>mixout,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org560578f" class="outline-2">
<h2 id="org560578f">stack-REPL</h2>
<div class="outline-text-2" id="text-org560578f">
</div><div id="outline-container-orgc68719c" class="outline-3">
<h3 id="orgc68719c"><span class="todo note">note</span> </h3>
<div class="outline-text-3" id="text-orgc68719c">
<ul class="org-ul">
<li><p>print argument-stack in every loop</p></li></ul>
</div>
</div>

<div id="outline-container-orgf3ee27b" class="outline-3">
<h3 id="orgf3ee27b">stack-REPL</h3>
<div class="outline-text-3" id="text-orgf3ee27b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">stack-REPL,loop</span>
  <span style="color: #FF8888;">&lt;&lt; unknown -- unknown &gt;&gt;</span>
  read-word
  word-interpreter
  <span style="color: #ffffff; font-weight: bold;">argument-stack:</span>pretty-print
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">stack-REPL</span>
  <span style="color: #FF8888;">&lt;&lt; unknown -- unknown &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> bye,basic-REPL
  <span style="color: #fd971f; font-weight: bold;">'bye,basic-REPL</span> <span style="color: #1ef15f; font-weight: bold;">await</span>
  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> push-syntax-stack
  stack-REPL,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgf2447c5" class="outline-2">
<h2 id="orgf2447c5">eval-string</h2>
<div class="outline-text-2" id="text-orgf2447c5">
</div><div id="outline-container-orga2836e4" class="outline-3">
<h3 id="orga2836e4"><span class="todo note">note</span> </h3>
<div class="outline-text-3" id="text-orga2836e4">
<ul class="org-ul">
<li><p>(eval-string) is implemented by doing side-effect on reading-stack</p><p>this is because syntax extension system is implemented by reader-macro</p></li>
<li><p>by implementing (eval-string) this way</p><p>i can easily change the syntax be used to eval a string</p></li></ul>
</div>
</div>

<div id="outline-container-orgf018d91" class="outline-3">
<h3 id="orgf018d91">eval-string</h3>
<div class="outline-text-3" id="text-orgf018d91">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">eval-string,loop</span>
  <span style="color: #FF8888;">&lt;&lt; unknown -- unknown &gt;&gt;</span>
  tos-reading-stack <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  read-word
  word-interpreter
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">eval-string</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- unknown &gt;&gt;</span>
  push-reading-stack
  eval-string,loop
  drop-reading-stack
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5a36716" class="outline-3">
<h3 id="org5a36716"><span class="done test">test</span> eval-string</h3>
<div class="outline-text-3" id="text-org5a36716">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) eval-string"</span> .s .l
  <span style="color: #e6db74;">"1 2 3 add add"</span> eval-string <span style="color: #fd971f; font-weight: bold;">6</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #e6db74;">"  1 2 3 add add  "</span> eval-string  <span style="color: #fd971f; font-weight: bold;">6</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #e6db74;">" k</span>
<span style="color: #e6db74;">    1 2 3 add add</span>
<span style="color: #e6db74;">    end</span>
<span style="color: #e6db74;">  "</span>
  <span style="color: #e6db74;">"define-function k"</span> eval-string <span style="color: #fd971f; font-weight: bold;">6</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
  k <span style="color: #fd971f; font-weight: bold;">6</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org6f2f9bd" class="outline-2">
<h2 id="org6f2f9bd">define-variable</h2>
<div class="outline-text-2" id="text-org6f2f9bd">
</div><div id="outline-container-org746d944" class="outline-3">
<h3 id="org746d944"><span class="todo note">note</span> string allocation</h3>
<div class="outline-text-3" id="text-org746d944">
<ul class="org-ul">
<li><p>string should be allocated to a static area</p><p>instead of dynamic area like <b>circular-string-area</b></p><p>thus we have</p><p>(syntax,double-quote,define-variable)</p></li></ul>
</div>
</div>

<div id="outline-container-org673c897" class="outline-3">
<h3 id="org673c897">syntax,double-quote,define-variable</h3>
<div class="outline-text-3" id="text-org673c897">
<ul class="org-ul">
<li><p>in ASCII encode double-quote is 34</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax,double-quote,define-variable,loop</span>
  <span style="color: #FF8888;">&lt;&lt; cursor -- cursor &gt;&gt;</span>
  read-byte
  dup <span style="color: #fd971f; font-weight: bold;">34</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  over set-byte
  add1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">syntax,double-quote,define-variable</span>
  <span style="color: #FF8888;">&lt;&lt; literal-word:double-quote -- string[address, length] &gt;&gt;</span>
  drop2
  <span style="color: #fd971f; font-weight: bold;">1024</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  syntax,double-quote,define-variable,loop
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:buffer</span> sub
  make-string
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org1f598c1" class="outline-3">
<h3 id="org1f598c1">define-variable</h3>
<div class="outline-text-3" id="text-org1f598c1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">define-variable</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>

  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #dc322f; font-weight: bold;">&gt;::body</span>

  snapshot-the-stack-pointer
  <span style="color: #fd971f; font-weight: bold;">*the-stack-pointer-snapshot*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:old-snapshot</span>

  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>double-quote?
  <span style="color: #f92672; font-weight: bold;">jo</span> syntax,double-quote,define-variable
  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

  <span style="color: #5CDD5C; font-weight: bold;">::body</span> eval-string

  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">literal-word:</span>double-quote?
  <span style="color: #f92672; font-weight: bold;">jo</span> syntax,double-quote,define-variable
  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>sub

  snapshot-the-stack-pointer
  <span style="color: #fd971f; font-weight: bold;">*the-stack-pointer-snapshot*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:new-snapshot</span>

  <span style="color: #83EA83; font-weight: bold;">:new-snapshot</span> <span style="color: #83EA83; font-weight: bold;">:old-snapshot</span> sub

  dup <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    negate <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div
    <span style="color: #e6db74;">"* (define-variable) fail to define variable : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
    <span style="color: #e6db74;">"  because after eval the following body"</span> .s .l
    <span style="color: #e6db74;">"  the stack is "</span> .s .i <span style="color: #e6db74;">" below what it use to be"</span> .s .l
    <span style="color: #5CDD5C; font-weight: bold;">::body</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #e6db74;">"* (define-variable) fail to define variable : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
    <span style="color: #e6db74;">"  because after eval the following body"</span> .s .l
    <span style="color: #e6db74;">"  the stack is still where it use to be"</span> .s .l
    <span style="color: #5CDD5C; font-weight: bold;">::body</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #5CDD5C; font-weight: bold;">::name</span> make-string <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>

  <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #fd971f; font-weight: bold;">*link*</span> <span style="color: #fd971f; font-weight: bold;">0</span>
  make-link <span style="color: #FF4C4C; font-weight: bold;">&gt;:link</span>

  <span style="color: #83EA83; font-weight: bold;">:link</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*link*</span> set

  <span style="color: #fd971f; font-weight: bold;">*explainer,variable*</span> <span style="color: #fd971f; font-weight: bold;">0</span>
  make-jo-head <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo</span>

  <span style="color: #83EA83; font-weight: bold;">:jo</span> <span style="color: #83EA83; font-weight: bold;">:link</span> link,set-jo

  <span style="color: #83EA83; font-weight: bold;">:link</span> name-hash-table,record-jo,by-link

  <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #83EA83; font-weight: bold;">:jo</span> jo,set-length

  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span>
  n-set

  <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
  add-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org94208b5" class="outline-3">
<h3 id="org94208b5"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org94208b5">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">define-variable:*testing-numbers*</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">3</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>
<span style="color: #fd971f; font-weight: bold;">define-variable:*testing-numbers*</span> . . . <span style="color: #FF8888;">&lt;&lt; 3 2 1 &gt;&gt;</span>
<span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">define-variable:*testing-numbers*</span> get . <span style="color: #FF8888;">&lt;&lt; 1 &gt;&gt;</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">define-variable:*testing-string*</span>
  <span style="color: #e6db74;">"define-variable"</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>
<span style="color: #fd971f; font-weight: bold;">define-variable:*testing-string*</span> .s <span style="color: #FF8888;">&lt;&lt; define-variable &gt;&gt;</span>

<span style="color: #FF8888;">&lt;&lt; error &gt;&gt;</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">kkk</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> . <span style="color: #fd971f; font-weight: bold;">2</span> . <span style="color: #fd971f; font-weight: bold;">3</span> .
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>

<span style="color: #FF8888;">&lt;&lt; error &gt;&gt;</span>
<span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">3</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">kkk</span>
  . . .
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>
</pre>
</div>
</div>
</div>
</div>


<div id="outline-container-org8983de4" class="outline-2">
<h2 id="org8983de4">system misc</h2>
<div class="outline-text-2" id="text-org8983de4">
</div><div id="outline-container-org254a27c" class="outline-3">
<h3 id="org254a27c"><span class="todo note">note</span> linux</h3>
</div>

<div id="outline-container-org5dc6135" class="outline-3">
<h3 id="org5dc6135">init-syscall-number&#xa0;&#xa0;&#xa0;<span class="tag"><span class="32bit">32bit</span></span></h3>
<div class="outline-text-3" id="text-org5dc6135">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #fd971f; font-weight: bold;">5</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*open*</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">6</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*close*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">3</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*read*</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">4</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*write*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">9</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*link*</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">10</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*unlink*</span>     <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">39</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*mkdir*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">40</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*rmdir*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">141</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*getdents*</span>   <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">220</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*getdents64*</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">106</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*stat*</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">1</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*exit*</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">43</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*times*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">20</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*getpid*</span>     <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">183</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*getcwd*</span>     <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">12</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*chdir*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #f92672; font-weight: bold;">then</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orga4615e" class="outline-3">
<h3 id="orga4615e">init-syscall-number&#xa0;&#xa0;&#xa0;<span class="tag"><span class="64bit">64bit</span></span></h3>
<div class="outline-text-3" id="text-orga4615e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #fd971f; font-weight: bold;">2</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*open*</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">3</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*close*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">0</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*read*</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">1</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*write*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">86</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*link*</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">87</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*unlink*</span>     <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">83</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*mkdir*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">84</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*rmdir*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">78</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*getdents*</span>   <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">217</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*getdents64*</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">4</span>   <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*stat*</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">60</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*exit*</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">100</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*times*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">39</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*getpid*</span>     <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">79</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*getcwd*</span>     <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
  <span style="color: #fd971f; font-weight: bold;">80</span>  <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*chdir*</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #f92672; font-weight: bold;">then</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgded109" class="outline-3">
<h3 id="orgded109">error-code-&gt;string</h3>
<div class="outline-text-3" id="text-orgded109">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">error-code-&gt;string</span>
  <span style="color: #FF8888;">&lt;&lt; error-code -- string[address, length] &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">-1</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EPERM   &gt;&gt;</span>   <span style="color: #e6db74;">"Operation not permitted "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-2</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ENOENT  &gt;&gt;</span>   <span style="color: #e6db74;">"No such file or directory "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-3</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ESRCH   &gt;&gt;</span>   <span style="color: #e6db74;">"No such process "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-4</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EINTR   &gt;&gt;</span>   <span style="color: #e6db74;">"Interrupted system call "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-5</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EIO     &gt;&gt;</span>   <span style="color: #e6db74;">"I/O error "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-6</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ENXIO   &gt;&gt;</span>   <span style="color: #e6db74;">"No such device or address "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-7</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; E2BIG   &gt;&gt;</span>   <span style="color: #e6db74;">"Argument list too long "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-8</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ENOEXEC &gt;&gt;</span>   <span style="color: #e6db74;">"Exec format error "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-9</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EBADF   &gt;&gt;</span>   <span style="color: #e6db74;">"Bad file number "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-10</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ECHILD  &gt;&gt;</span>   <span style="color: #e6db74;">"No child processes "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-11</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EAGAIN  &gt;&gt;</span>   <span style="color: #e6db74;">"Try again "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-12</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ENOMEM  &gt;&gt;</span>   <span style="color: #e6db74;">"Out of memory "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-13</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EACCES  &gt;&gt;</span>   <span style="color: #e6db74;">"Permission denied "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-14</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EFAULT  &gt;&gt;</span>   <span style="color: #e6db74;">"Bad address "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-15</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ENOTBLK &gt;&gt;</span>   <span style="color: #e6db74;">"Block device required "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-16</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EBUSY   &gt;&gt;</span>   <span style="color: #e6db74;">"Device or resource busy "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-17</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EEXIST  &gt;&gt;</span>   <span style="color: #e6db74;">"File exists "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-18</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EXDEV   &gt;&gt;</span>   <span style="color: #e6db74;">"Cross-device link "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-19</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ENODEV  &gt;&gt;</span>   <span style="color: #e6db74;">"No such device "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-20</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ENOTDIR &gt;&gt;</span>   <span style="color: #e6db74;">"Not a directory "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-21</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EISDIR  &gt;&gt;</span>   <span style="color: #e6db74;">"Is a directory "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-22</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EINVAL  &gt;&gt;</span>   <span style="color: #e6db74;">"Invalid argument "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-23</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ENFILE  &gt;&gt;</span>   <span style="color: #e6db74;">"File table overflow "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-24</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EMFILE  &gt;&gt;</span>   <span style="color: #e6db74;">"Too many open files "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-25</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ENOTTY  &gt;&gt;</span>   <span style="color: #e6db74;">"Not a typewriter "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-26</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ETXTBSY &gt;&gt;</span>   <span style="color: #e6db74;">"Text file busy "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-27</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EFBIG   &gt;&gt;</span>   <span style="color: #e6db74;">"File too large "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-28</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ENOSPC  &gt;&gt;</span>   <span style="color: #e6db74;">"No space left on device "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-29</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ESPIPE  &gt;&gt;</span>   <span style="color: #e6db74;">"Illegal seek "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-30</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EROFS   &gt;&gt;</span>   <span style="color: #e6db74;">"Read-only file system "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-31</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EMLINK  &gt;&gt;</span>   <span style="color: #e6db74;">"Too many links "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-32</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EPIPE   &gt;&gt;</span>   <span style="color: #e6db74;">"Broken pipe "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-33</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; EDOM    &gt;&gt;</span>   <span style="color: #e6db74;">"Math argument out of domain of func "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">-34</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop  <span style="color: #FF8888;">&lt;&lt; ERANGE  &gt;&gt;</span>   <span style="color: #e6db74;">"Math result not representable "</span> <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"unknow error-code : "</span> .s .i .l
  <span style="color: #e6db74;">"* (error-code-&gt;string) fail"</span> <span style="color: #FF8888;">&lt;&lt; to balance the argument-stack &gt;&gt;</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org818639d" class="outline-3">
<h3 id="org818639d">file-type-code-&gt;string</h3>
<div class="outline-text-3" id="text-org818639d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">file-type-code-&gt;string</span>
  <span style="color: #FF8888;">&lt;&lt; file-type-code -- string[address, length] &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">1</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span>  <span style="color: #FF8888;">&lt;&lt; DT_FIFO  &gt;&gt;</span>  <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"named pipe i.e. FIFO"</span>  <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">2</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span>  <span style="color: #FF8888;">&lt;&lt; DT_CHR   &gt;&gt;</span>  <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"Character device"</span>      <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">4</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span>  <span style="color: #FF8888;">&lt;&lt; DT_DIR   &gt;&gt;</span>  <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"directory"</span>             <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">6</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span>  <span style="color: #FF8888;">&lt;&lt; DT_BLK   &gt;&gt;</span>  <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"block device"</span>          <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">8</span>  <span style="color: #ffffff; font-weight: bold;">equal?</span>  <span style="color: #FF8888;">&lt;&lt; DT_REG   &gt;&gt;</span>  <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"regular file"</span>          <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #ffffff; font-weight: bold;">equal?</span>  <span style="color: #FF8888;">&lt;&lt; DT_LNK   &gt;&gt;</span>  <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"symbolic link"</span>         <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">12</span> <span style="color: #ffffff; font-weight: bold;">equal?</span>  <span style="color: #FF8888;">&lt;&lt; DT_SOCK  &gt;&gt;</span>  <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"UNIX domain socket"</span>    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  drop
  <span style="color: #e6db74;">"unknow file type"</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org11750ba" class="outline-2">
<h2 id="org11750ba">port</h2>
<div class="outline-text-2" id="text-org11750ba">
</div><div id="outline-container-org69665e4" class="outline-3">
<h3 id="org69665e4"><span class="todo _">記</span> 關於輸入輸出</h3>
<div class="outline-text-3" id="text-org69665e4">
<ul class="org-ul">
<li><p>接口設計分兩個層次</p><p><ol class="org-ol"></p><p><li>底層的以 port 爲基礎的接口</p><p>這裏應該如何設計還不確定</p><p>可能會模仿操作系統所提供的接口</li></p><p><li>高層的以 path 爲基礎的接口</p><p>這裏將抽象掉 port 這個概念</p><p>也就是每次簡單的讀寫都伴隨兩個對 port 的操作</p><p>這樣接口就很簡單 但是速度可能會非常慢</li></ol></p></li>
<li><p>目前</p><p>二者的接口差異是通過前綴 port:體現出來的</p></li></ul>
</div>
</div>

<div id="outline-container-orga4d7fd8" class="outline-3">
<h3 id="orga4d7fd8"><span class="todo note">note</span> linux header</h3>
<div class="outline-text-3" id="text-orga4d7fd8">
<ul class="org-ul">
<li><p>8 base number :</p><p>O_ACCMODE          0003</p><p>O_RDONLY             00</p><p>O_WRONLY             01</p><p>O_RDWR               02</p><p>O_CREAT            0100  Not fcntl</p><p>O_EXCL             0200  Not fcntl</p><p>O_NOCTTY           0400  Not fcntl</p><p>O_TRUNC           01000  Not fcntl</p><p>O_APPEND          02000</p><p>O_NONBLOCK        04000</p><p>O_NDELAY     O_NONBLOCK</p><p>O_SYNC         04010000</p><p>O_FSYNC          O_SYNC</p><p>O_ASYNC          020000</p><p>O_LARGEFILE     0100000</p><p>O_DIRECTORY     0200000</p><p>O_NOFOLLOW      0400000</p><p>O_CLOEXEC      02000000</p><p>O_DIRECT         040000</p><p>O_NOATIME      01000000</p><p>O_PATH        010000000</p><p>O_DSYNC          010000</p><p>O_TMPFILE     020200000</p></li></ul>
</div>
</div>

<div id="outline-container-org4947fea" class="outline-3">
<h3 id="org4947fea"><span class="todo note">note</span> interface</h3>
<div class="outline-text-3" id="text-org4947fea">
<ul class="org-ul">
<li><p>open to read</p></li>
<li><p><p></p><p>create and update to write</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">create</td></p><p><td class="org-left">fail if already exist</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">update</td></p><p><td class="org-left">fail if nor exist</td></p><p></tr></p><p></tbody></p><p></table></p></li>
<li><p>one should always know if a file exist or not</p><p>when open it as output-port</p><p>predicates are provided to help you to do so</p></li></ul>
</div>
</div>

<div id="outline-container-orgb05fa42" class="outline-3">
<h3 id="orgb05fa42"><span class="todo note">note</span> syscall with string arguments</h3>
<div class="outline-text-3" id="text-orgb05fa42">
<ul class="org-ul">
<li><p>for syscall the arguments in stack look like</p><p>&lt;&lt; &#x2026;, arg3, arg2, arg1 &gt;&gt;</p><p>so</p><p>for read(port, buffer, size)</p><p>we need</p><p>&lt;&lt; size, buffer, port &gt;&gt;</p><p>but the interface (port:read) in cicada-nymph is</p><p>&lt;&lt; buffer, size, port &gt;&gt;</p><p>thus we need a swap here</p><p>and</p><p>we should be careful</p><p>for other interface functions in cicada-nymph</p></li></ul>
</div>
</div>

<div id="outline-container-org7f6259e" class="outline-3">
<h3 id="org7f6259e">port:open</h3>
<div class="outline-text-3" id="text-org7f6259e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">port:open</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length]</span>
<span style="color: #FF8888;">     -- port, true</span>
<span style="color: #FF8888;">     -- error-code, false &gt;&gt;</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  O_RDONLY</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*open*</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgbcb279" class="outline-3">
<h3 id="orgbcb279">port:create</h3>
<div class="outline-text-3" id="text-orgbcb279">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">port:create</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length]</span>
<span style="color: #FF8888;">     -- port, true</span>
<span style="color: #FF8888;">     -- error-code, false &gt;&gt;</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">644</span> <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  2#110100100</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">1102</span> <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  O_RDWR   0002</span>
<span style="color: #FF8888;">  O_CREAT  0100</span>
<span style="color: #FF8888;">  O_TRUNC  1000</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*open*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org76dc9a2" class="outline-3">
<h3 id="org76dc9a2">port:update</h3>
<div class="outline-text-3" id="text-org76dc9a2">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">port:update</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length]</span>
<span style="color: #FF8888;">     -- port, true</span>
<span style="color: #FF8888;">     -- error-code, false &gt;&gt;</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">644</span> <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  110100100b</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">1002</span> <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  O_RDWR   0002</span>
<span style="color: #FF8888;">  O_TRUNC  1000</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*open*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc93fcbc" class="outline-3">
<h3 id="orgc93fcbc">port:close</h3>
<div class="outline-text-3" id="text-orgc93fcbc">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">port:close</span>
  <span style="color: #FF8888;">&lt;&lt; port</span>
<span style="color: #FF8888;">     -- true</span>
<span style="color: #FF8888;">     -- error-code, false &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*close*</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orga0decf9" class="outline-3">
<h3 id="orga0decf9">port:read</h3>
<div class="outline-text-3" id="text-orga0decf9">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">port:read</span>
  <span style="color: #FF8888;">&lt;&lt; buffer, max-size, port</span>
<span style="color: #FF8888;">     -- counter, true</span>
<span style="color: #FF8888;">     -- error-code, false &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>
  swap
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*read*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org343416b" class="outline-3">
<h3 id="org343416b">port:write</h3>
<div class="outline-text-3" id="text-org343416b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">port:write</span>
  <span style="color: #FF8888;">&lt;&lt; buffer, max-size, port</span>
<span style="color: #FF8888;">     -- counter, true</span>
<span style="color: #FF8888;">     -- error-code, false &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>
  swap
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*write*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org88b390e" class="outline-3">
<h3 id="org88b390e"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org88b390e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">k</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"kkk~"</span> <span style="color: #ffffff; font-weight: bold;">port:</span>create <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">port:</span>close <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #00ffff; font-weight: bold;">end</span>
    <span style="color: #f92672; font-weight: bold;">then</span> error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span> error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
k

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">k</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"kkk~"</span> <span style="color: #ffffff; font-weight: bold;">port:</span>update <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">port:</span>close <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #00ffff; font-weight: bold;">end</span>
    <span style="color: #f92672; font-weight: bold;">then</span> error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span> error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
k

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">k</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span>
  dup
  <span style="color: #e6db74;">"kkk~"</span> <span style="color: #ffffff; font-weight: bold;">port:</span>open <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">64</span> swap <span style="color: #ffffff; font-weight: bold;">port:</span>read <span style="color: #f92672; font-weight: bold;">if</span>
      .s .l
      <span style="color: #00ffff; font-weight: bold;">end</span>
    <span style="color: #f92672; font-weight: bold;">then</span> error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span> error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
k
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org6512969" class="outline-2">
<h2 id="org6512969">file</h2>
<div class="outline-text-2" id="text-org6512969">
</div><div id="outline-container-orgd55b9c7" class="outline-3">
<h3 id="orgd55b9c7"><span class="todo note">note</span> interface</h3>
<div class="outline-text-3" id="text-orgd55b9c7">
<ul class="org-ul">
<li><p>note that</p><p>the concept of port is</p><p>completely removed from the interface</p></li>
<li><p><p></p><p>file-tree</p><p>two types of nodes</p><p></p></p><p><ol class="org-ol"></p><p><li>file</li></p><p><li>directory</li></ol></p><p><p></p><p>a leaf must be a file</p><p></p></p></li>
<li><p>the interface</p><p><ol class="org-ol"></p><p><li>use path as an argument</li></p><p><li>print error message on error</p><p>instead of</p><p>return error info</p><p>or do non-local-exit</li></ol></p></li></ul>
</div>
</div>

<div id="outline-container-orgd76dc75" class="outline-3">
<h3 id="orgd76dc75"><span class="todo _">記</span> 元數據</h3>
<div class="outline-text-3" id="text-orgd76dc75">
<ul class="org-ul">
<li><p>訪問管理</p><p><ol class="org-ol"></p><p><li>誰有權訪問這個文件</li></p><p><li>他的權利是什麼</li></ol></p></li>
<li><p>文件類型</p><p>[linux 沒有]</p></li>
<li><p>文件大小</p></li>
<li><p>文件使用註釋</p><p>[linux 沒有]</p></li></ul>
</div>
</div>

<div id="outline-container-org36410d1" class="outline-3">
<h3 id="org36410d1"><a href="create">create</a></h3>
<div class="outline-text-3" id="text-org36410d1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">file:create</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::path</span>
  <span style="color: #5CDD5C; font-weight: bold;">::path</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">644</span> <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  2#110100100</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">0200</span>
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">0100</span> bit-or <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  O_EXCL   0200</span>
<span style="color: #FF8888;">  O_CREAT  0100</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*open*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (file:create) fail to open port for the following path :"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">port:</span>close <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (file:create) fail to close port for the following path :"</span> .s .l
  <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
  <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org82efd7e" class="outline-3">
<h3 id="org82efd7e"><a href="write">write</a></h3>
<div class="outline-text-3" id="text-org82efd7e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">file:write</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::path</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::path</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">644</span> <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  2#110100100</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">1002</span> <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  O_RDWR   0002</span>
<span style="color: #FF8888;">  O_TRUNC  1000</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*open*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (file:write) fail to open port for the following path :"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> swap
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*write*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (file:write) fail to write port for the following path :"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:counter</span> <span style="color: #FF8888;">&lt;&lt; bytes been written &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #ffffff; font-weight: bold;">port:</span>close <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (file:write) fail to close port for the following path : "</span> .s .l
  <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
  <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc5fe150" class="outline-3">
<h3 id="orgc5fe150"><a href="read">read</a></h3>
<div class="outline-text-3" id="text-orgc5fe150">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">file:read</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, max-length], path[address, length] -- counter &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::path</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::path</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  O_RDONLY</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*open*</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (file:read) fail to open port for the following path :"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #fd971f; font-weight: bold;">0</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> swap
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*read*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (file:read) fail to read port for the following path :"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #fd971f; font-weight: bold;">0</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:counter</span> <span style="color: #FF8888;">&lt;&lt; bytes been readed &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #ffffff; font-weight: bold;">port:</span>close <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:counter</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (file:read) fail to close port for the following path : "</span> .s .l
  <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
  <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
  <span style="color: #fd971f; font-weight: bold;">0</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org1b2d499" class="outline-3">
<h3 id="org1b2d499"><a href="remove">remove</a></h3>
<div class="outline-text-3" id="text-org1b2d499">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">file:remove</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::path</span>
  <span style="color: #5CDD5C; font-weight: bold;">::path</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*unlink*</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (file:remove) fail for the following path :"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org8c6749c" class="outline-3">
<h3 id="org8c6749c"><span class="done test">test</span> file</h3>
<div class="outline-text-3" id="text-org8c6749c">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">file,test</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"kkk~"</span> <span style="color: #ffffff; font-weight: bold;">file:</span>create

  <span style="color: #e6db74;">"kkk took my baby away"</span> dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #e6db74;">"kkk~"</span> <span style="color: #ffffff; font-weight: bold;">file:</span>write

  <span style="color: #e6db74;">"............................"</span> <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #e6db74;">"kkk~"</span> <span style="color: #ffffff; font-weight: bold;">file:</span>read <span style="color: #FF4C4C; font-weight: bold;">&gt;:counter</span>

  <span style="color: #83EA83; font-weight: bold;">:counter</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #1ef15f; font-weight: bold;">test</span>

  <span style="color: #e6db74;">"kkk took my baby away......."</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>

  <span style="color: #e6db74;">"kkk~"</span> <span style="color: #ffffff; font-weight: bold;">file:</span>remove
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) file"</span> .s .l
  file,test
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgaed3820" class="outline-2">
<h2 id="orgaed3820">directory</h2>
<div class="outline-text-2" id="text-orgaed3820">
</div><div id="outline-container-org85133df" class="outline-3">
<h3 id="org85133df">directory:create</h3>
<div class="outline-text-3" id="text-org85133df">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">directory:create</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::path</span>
  <span style="color: #5CDD5C; font-weight: bold;">::path</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">755</span> <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  2#111101101</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*mkdir*</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (directory:create) fail for the following path :"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org10cf538" class="outline-3">
<h3 id="org10cf538">directory:remove</h3>
<div class="outline-text-3" id="text-org10cf538">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">directory:remove</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::path</span>
  <span style="color: #5CDD5C; font-weight: bold;">::path</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*rmdir*</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (directory:remove) fail for the following path :"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgfe31caa" class="outline-3">
<h3 id="orgfe31caa"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-orgfe31caa">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #e6db74;">"kkk"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>create
<span style="color: #e6db74;">"kkk"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>remove
</pre>
</div>
</div>
</div>

<div id="outline-container-org5ff9a79" class="outline-3">
<h3 id="org5ff9a79">system-getdents64</h3>
<div class="outline-text-3" id="text-org5ff9a79">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+getdents64,ino+</span>        <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+getdents64,off+</span>        <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+getdents64,reclen+</span>     <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+getdents64,type+</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+getdents64,name+</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+getdents64,end+</span>          <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">init,getdents64</span>
  <span style="color: #FF8888;">&lt;&lt; offset -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,ino+</span>    set    <span style="color: #fd971f; font-weight: bold;">8</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,off+</span>    set    <span style="color: #fd971f; font-weight: bold;">8</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,reclen+</span> set    <span style="color: #fd971f; font-weight: bold;">2</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,type+</span>   set    <span style="color: #fd971f; font-weight: bold;">1</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span>   set    <span style="color: #fd971f; font-weight: bold;">256</span> add
        <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,end+</span>      set
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,ino+</span>    set    <span style="color: #fd971f; font-weight: bold;">8</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,off+</span>    set    <span style="color: #fd971f; font-weight: bold;">8</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,reclen+</span> set    <span style="color: #fd971f; font-weight: bold;">2</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,type+</span>   set    <span style="color: #fd971f; font-weight: bold;">1</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span>   set    <span style="color: #fd971f; font-weight: bold;">256</span> add
        <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,end+</span>      set
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #fd971f; font-weight: bold;">0</span> init,getdents64
<span style="color: #fd971f; font-weight: bold;">+getdents64,end+</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+getdents64,length+</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5dbfb09" class="outline-3">
<h3 id="org5dbfb09"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org5dbfb09">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,getdents64,print</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"+getdents64,ino+ : "</span>    .s <span style="color: #fd971f; font-weight: bold;">+getdents64,ino+</span>     get . .l
  <span style="color: #e6db74;">"+getdents64,off+ : "</span>    .s <span style="color: #fd971f; font-weight: bold;">+getdents64,off+</span>     get . .l
  <span style="color: #e6db74;">"+getdents64,reclen+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+getdents64,reclen+</span>  get-two-bytes . .l
  <span style="color: #e6db74;">"+getdents64,type+ : "</span>   .s
  <span style="color: #fd971f; font-weight: bold;">+getdents64,type+</span>
  get-byte file-type-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
  <span style="color: #e6db74;">"+getdents64,name+ : "</span>   .s
  <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span>
  dup <span style="color: #fd971f; font-weight: bold;">256</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffffff; font-weight: bold;">string:</span>find-byte
  drop  <span style="color: #FF8888;">&lt;&lt; drop 0 &gt;&gt;</span>
  over sub .s .l
  .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,getdents64,loop,structure</span>
  <span style="color: #FF8888;">&lt;&lt; end, cursor -- &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">less-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> init,getdents64
  test,getdents64,print
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,reclen+</span> get-two-bytes add
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,getdents64,loop</span>
  <span style="color: #FF8888;">&lt;&lt; port -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>
  <span style="color: #fd971f; font-weight: bold;">1024</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:getdents64-structure-list</span>
  <span style="color: #fd971f; font-weight: bold;">1024</span>
  <span style="color: #83EA83; font-weight: bold;">:getdents64-structure-list</span>
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*getdents64*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  <span style="color: #e6db74;">"* syscall returns : "</span> .s dup .i .l
  dup <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:getdents64-structure-list</span> add
  <span style="color: #83EA83; font-weight: bold;">:getdents64-structure-list</span>
  test,getdents64,loop,structure
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,getdents64</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::path</span>
  <span style="color: #5CDD5C; font-weight: bold;">::path</span> <span style="color: #ffffff; font-weight: bold;">port:</span>open <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (test,getdents64) fail to open : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>
  <span style="color: #83EA83; font-weight: bold;">:port</span> test,getdents64,loop
  <span style="color: #83EA83; font-weight: bold;">:port</span> <span style="color: #ffffff; font-weight: bold;">port:</span>close <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (test,getdents64) fail to close : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
  <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #e6db74;">"play"</span> test,getdents64
<span style="color: #e6db74;">"play/kkk"</span> test,getdents64
<span style="color: #e6db74;">"."</span> test,getdents64
<span style="color: #e6db74;">"/"</span> test,getdents64
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf432128" class="outline-3">
<h3 id="orgf432128">directory:empty?</h3>
<div class="outline-text-3" id="text-orgf432128">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">directory:empty?</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length] -- bool &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::path</span>
  <span style="color: #5CDD5C; font-weight: bold;">::path</span> <span style="color: #ffffff; font-weight: bold;">port:</span>open <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (directory:empty?) fail to open : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>
  <span style="color: #fd971f; font-weight: bold;">128</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:getdents64-structure-list</span>
  <span style="color: #fd971f; font-weight: bold;">128</span>
  <span style="color: #83EA83; font-weight: bold;">:getdents64-structure-list</span>
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*getdents64*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  <span style="color: #fd971f; font-weight: bold;">48</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #FF8888;">&lt;&lt; this call to equal? returns the needed bool &gt;&gt;</span>
  <span style="color: #83EA83; font-weight: bold;">:port</span> <span style="color: #ffffff; font-weight: bold;">port:</span>close <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (directory:empty?) fail to close : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
  <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
  <span style="color: #fd971f; font-weight: bold;">false</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd5774e8" class="outline-3">
<h3 id="orgd5774e8"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-orgd5774e8">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #e6db74;">"play"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>empty? . .l
<span style="color: #e6db74;">"play/kkk"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>empty? . .l
<span style="color: #e6db74;">"play/aaa"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>empty? . .l
<span style="color: #e6db74;">"."</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>empty? . .l
<span style="color: #e6db74;">"/"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>empty? . .l
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc13c84a" class="outline-3">
<h3 id="orgc13c84a">directory:map</h3>
<div class="outline-text-3" id="text-orgc13c84a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">directory:map,loop,apply</span>
  <span style="color: #FF8888;">&lt;&lt; end, cursor, function -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:function</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">less-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:end</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> init,getdents64
  <span style="color: #83EA83; font-weight: bold;">:function</span> apply
  <span style="color: #83EA83; font-weight: bold;">:end</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,reclen+</span> get-two-bytes add
  <span style="color: #83EA83; font-weight: bold;">:function</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">directory:map,loop</span>
  <span style="color: #FF8888;">&lt;&lt; port, function -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:function</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>
  <span style="color: #fd971f; font-weight: bold;">1024</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:getdents64-structure-list</span>
  <span style="color: #fd971f; font-weight: bold;">1024</span>
  <span style="color: #83EA83; font-weight: bold;">:getdents64-structure-list</span>
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*getdents64*</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> syscall
  dup <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (directory:map,loop) syscall fail"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:getdents64-structure-list</span> add
  <span style="color: #83EA83; font-weight: bold;">:getdents64-structure-list</span>
  <span style="color: #83EA83; font-weight: bold;">:function</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>map,loop,apply
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #83EA83; font-weight: bold;">:function</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">directory:map</span>
  <span style="color: #FF8888;">&lt;&lt; directory-path[address, length],</span>
<span style="color: #FF8888;">     function</span>
<span style="color: #FF8888;">     -- true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:function</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::directory-path</span>
  <span style="color: #5CDD5C; font-weight: bold;">::directory-path</span> <span style="color: #ffffff; font-weight: bold;">port:</span>open <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (directory:map) fail to open : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::directory-path</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>
  <span style="color: #83EA83; font-weight: bold;">:port</span> <span style="color: #83EA83; font-weight: bold;">:function</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>map,loop
  <span style="color: #83EA83; font-weight: bold;">:port</span> <span style="color: #ffffff; font-weight: bold;">port:</span>close <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"* (directory:map) fail to close : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::directory-path</span> .s .l
  <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org83c5154" class="outline-3">
<h3 id="org83c5154"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org83c5154">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,function</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">+getdents64,type+</span> get-byte
  <span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"  "</span> .s
    <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span>
    dup <span style="color: #fd971f; font-weight: bold;">256</span>
    <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffffff; font-weight: bold;">string:</span>find-byte
    drop  <span style="color: #FF8888;">&lt;&lt; drop 0 &gt;&gt;</span>
    over sub .s .l
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #e6db74;">"play"</span> <span style="color: #f92672; font-weight: bold;">jo</span> test,function <span style="color: #ffffff; font-weight: bold;">directory:</span>map
</pre>
</div>
</div>
</div>

<div id="outline-container-org5587dd9" class="outline-3">
<h3 id="org5587dd9">directory:list-file</h3>
<div class="outline-text-3" id="text-org5587dd9">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">directory:list-file</span>
  <span style="color: #FF8888;">&lt;&lt; directory-path[address, length] -- &gt;&gt;</span>
  <span style="color: #93a8c6;">[</span> <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
    <span style="color: #fd971f; font-weight: bold;">+getdents64,type+</span> get-byte
    <span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #e6db74;">"  "</span> .s
      <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span>
      dup <span style="color: #fd971f; font-weight: bold;">256</span>
      <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffffff; font-weight: bold;">string:</span>find-byte
      drop  <span style="color: #FF8888;">&lt;&lt; drop 0 &gt;&gt;</span>
      over sub .s .l
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #93a8c6;">]</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>map
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orga724d79" class="outline-3">
<h3 id="orga724d79">directory:list-directory</h3>
<div class="outline-text-3" id="text-orga724d79">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">directory:list-directory</span>
  <span style="color: #FF8888;">&lt;&lt; directory-path[address, length] -- &gt;&gt;</span>
  <span style="color: #93a8c6;">[</span> <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
    <span style="color: #fd971f; font-weight: bold;">+getdents64,type+</span> get-byte
    <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span>
      dup <span style="color: #fd971f; font-weight: bold;">256</span>
      <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffffff; font-weight: bold;">string:</span>find-byte
      drop  <span style="color: #FF8888;">&lt;&lt; drop 0 &gt;&gt;</span>
      over sub <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>
      <span style="color: #e6db74;">".."</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
        <span style="color: #00ffff; font-weight: bold;">end</span>
      <span style="color: #f92672; font-weight: bold;">then</span>
      <span style="color: #e6db74;">"."</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
        <span style="color: #00ffff; font-weight: bold;">end</span>
      <span style="color: #f92672; font-weight: bold;">then</span>
      <span style="color: #e6db74;">"  "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
      <span style="color: #00ffff; font-weight: bold;">end</span>
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #93a8c6;">]</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>map
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orged7cefa" class="outline-3">
<h3 id="orged7cefa"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-orged7cefa">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #e6db74;">"play"</span> dup2
<span style="color: #ffffff; font-weight: bold;">directory:</span>list-file
<span style="color: #ffffff; font-weight: bold;">directory:</span>list-directory

<span style="color: #e6db74;">"play/kkk"</span> dup2
<span style="color: #ffffff; font-weight: bold;">directory:</span>list-file
<span style="color: #ffffff; font-weight: bold;">directory:</span>list-directory

<span style="color: #e6db74;">"."</span> dup2
<span style="color: #ffffff; font-weight: bold;">directory:</span>list-file
<span style="color: #ffffff; font-weight: bold;">directory:</span>list-directory

<span style="color: #e6db74;">"/"</span> dup2
<span style="color: #ffffff; font-weight: bold;">directory:</span>list-file
<span style="color: #ffffff; font-weight: bold;">directory:</span>list-directory
</pre>
</div>
</div>
</div>

<div id="outline-container-org548e6a4" class="outline-3">
<h3 id="org548e6a4">directory:find-file</h3>
<div class="outline-text-3" id="text-org548e6a4">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">directory:find-file</span>
  <span style="color: #FF8888;">&lt;&lt; directory-path[address, length], file-name[address, length] -- bool &gt;&gt;</span>
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>xx
  <span style="color: #fd971f; font-weight: bold;">false</span>
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x
  <span style="color: #93a8c6;">[</span> <span style="color: #FF8888;">&lt;&lt; file-name[address, length], bool --</span>
<span style="color: #FF8888;">       file-name[address, length], bool &gt;&gt;</span>
    <span style="color: #fd971f; font-weight: bold;">+getdents64,type+</span> get-byte <span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #00ffff; font-weight: bold;">end</span>
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #FF4C4C; font-weight: bold;">&gt;:bool</span>
    <span style="color: #FF4C4C; font-weight: bold;">&gt;:file-name,lenght</span>
    <span style="color: #FF4C4C; font-weight: bold;">&gt;:file-name,address</span>
    <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span> add
    get-byte <span style="color: #ffffff; font-weight: bold;">zero?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #83EA83; font-weight: bold;">:file-name,address</span>
      <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span>
      <span style="color: #83EA83; font-weight: bold;">:bool</span>
      <span style="color: #00ffff; font-weight: bold;">end</span>
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #83EA83; font-weight: bold;">:file-name,address</span> <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span>
    <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span> <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span>
    <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #83EA83; font-weight: bold;">:file-name,address</span>
      <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span>
      <span style="color: #fd971f; font-weight: bold;">true</span>
      <span style="color: #00ffff; font-weight: bold;">end</span>
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #83EA83; font-weight: bold;">:file-name,address</span>
    <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span>
    <span style="color: #83EA83; font-weight: bold;">:bool</span>
    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #93a8c6;">]</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>map
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x drop2
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb83a00e" class="outline-3">
<h3 id="orgb83a00e">directory:find-directory</h3>
<div class="outline-text-3" id="text-orgb83a00e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">directory:find-directory</span>
  <span style="color: #FF8888;">&lt;&lt; directory-path[address, length], file-name[address, length] -- bool &gt;&gt;</span>
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>xx
  <span style="color: #fd971f; font-weight: bold;">false</span>
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x
  <span style="color: #93a8c6;">[</span> <span style="color: #FF8888;">&lt;&lt; file-name[address, length], bool --</span>
<span style="color: #FF8888;">       file-name[address, length], bool &gt;&gt;</span>
    <span style="color: #fd971f; font-weight: bold;">+getdents64,type+</span> get-byte <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #00ffff; font-weight: bold;">end</span>
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #FF4C4C; font-weight: bold;">&gt;:bool</span>
    <span style="color: #FF4C4C; font-weight: bold;">&gt;:file-name,lenght</span>
    <span style="color: #FF4C4C; font-weight: bold;">&gt;:file-name,address</span>
    <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span> <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span> add
    get-byte <span style="color: #ffffff; font-weight: bold;">zero?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #83EA83; font-weight: bold;">:file-name,address</span>
      <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span>
      <span style="color: #83EA83; font-weight: bold;">:bool</span>
      <span style="color: #00ffff; font-weight: bold;">end</span>
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #83EA83; font-weight: bold;">:file-name,address</span> <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span>
    <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span> <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span>
    <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #83EA83; font-weight: bold;">:file-name,address</span>
      <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span>
      <span style="color: #fd971f; font-weight: bold;">true</span>
      <span style="color: #00ffff; font-weight: bold;">end</span>
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #83EA83; font-weight: bold;">:file-name,address</span>
    <span style="color: #83EA83; font-weight: bold;">:file-name,lenght</span>
    <span style="color: #83EA83; font-weight: bold;">:bool</span>
    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #93a8c6;">]</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>map
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x drop2
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgff67f0a" class="outline-3">
<h3 id="orgff67f0a"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-orgff67f0a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">find-file,test</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"play"</span> <span style="color: #e6db74;">"cn"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>find-file .
  <span style="color: #e6db74;">"play"</span> <span style="color: #e6db74;">"kkk"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>find-file .
  <span style="color: #e6db74;">"play"</span> <span style="color: #e6db74;">"no"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>find-file .
  .l
  <span style="color: #e6db74;">"playlay"</span> <span style="color: #e6db74;">"no"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>find-file .
  .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
find-file,test

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">find-directory,test</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"play"</span> <span style="color: #e6db74;">"cn"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>find-directory .
  <span style="color: #e6db74;">"play"</span> <span style="color: #e6db74;">"kkk"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>find-directory .
  <span style="color: #e6db74;">"play"</span> <span style="color: #e6db74;">"no"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>find-directory .
  .l
  <span style="color: #e6db74;">"playlay"</span> <span style="color: #e6db74;">"no"</span> <span style="color: #ffffff; font-weight: bold;">directory:</span>find-directory .
  .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
find-directory,test
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orge6bcf33" class="outline-2">
<h2 id="orge6bcf33">system environment</h2>
<div class="outline-text-2" id="text-orge6bcf33">
</div><div id="outline-container-org714a6af" class="outline-3">
<h3 id="org714a6af"><span class="todo note">note</span> linux</h3>
<div class="outline-text-3" id="text-org714a6af">
</div><div id="outline-container-org19e8099" class="outline-4">
<h4 id="org19e8099">one directory</h4>
<div class="outline-text-4" id="text-org19e8099">
<ul class="org-ul">
<li><p>all files about cicada</p><p>are stored in</p><p>"<i>home/&lt;user&gt;</i>.cicada"</p></li></ul>
</div>
</div>

<div id="outline-container-org7269117" class="outline-4">
<h4 id="org7269117">pid</h4>
<div class="outline-text-4" id="text-org7269117">
<ul class="org-ul">
<li><p>pid is the key to all the linux system environment</p></li>
<li><p>command-line</p><p>/proc/&lt;pid&gt;/cmdline</p></li>
<li><p>environment-variable-list</p><p>/proc/&lt;pid&gt;/environ</p></li></ul>
</div>
</div>
</div>

<div id="outline-container-org356844e" class="outline-3">
<h3 id="org356844e">[init|get]-pid</h3>
<div class="outline-text-3" id="text-org356844e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*pid*</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">init-pid</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*getpid*</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> syscall
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*pid*</span> set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">get-pid</span>
  <span style="color: #FF8888;">&lt;&lt; -- pid &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*pid*</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org76d4b0f" class="outline-3">
<h3 id="org76d4b0f">[init|get]-command-line</h3>
<div class="outline-text-3" id="text-org76d4b0f">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*address,command-line*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">512</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*length,command-line*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">init-command-line</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:path-buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:path-buffer</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  get-pid write-number,fill-buffer <span style="color: #dc322f; font-weight: bold;">&gt;::pid-string</span>

  <span style="color: #e6db74;">"/proc/"</span> dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:add-to-cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #83EA83; font-weight: bold;">:add-to-cursor</span> <span style="color: #83EA83; font-weight: bold;">:cursor</span> add <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  <span style="color: #5CDD5C; font-weight: bold;">::pid-string</span> dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:add-to-cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #83EA83; font-weight: bold;">:add-to-cursor</span> <span style="color: #83EA83; font-weight: bold;">:cursor</span> add <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  <span style="color: #e6db74;">"/cmdline"</span> dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:add-to-cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #83EA83; font-weight: bold;">:add-to-cursor</span> <span style="color: #83EA83; font-weight: bold;">:cursor</span> add <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  <span style="color: #83EA83; font-weight: bold;">:path-buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:path-buffer</span> sub dup2 <span style="color: #dc322f; font-weight: bold;">&gt;::path</span>
  <span style="color: #ffffff; font-weight: bold;">port:</span>open <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (init-command-line) fail to open : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>

  <span style="color: #fd971f; font-weight: bold;">*address,command-line*</span>
  <span style="color: #fd971f; font-weight: bold;">*length,command-line*</span>
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #ffffff; font-weight: bold;">port:</span>read <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (init-command-line) fail to read : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*length,command-line*</span> set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">get-command-line</span>
  <span style="color: #FF8888;">&lt;&lt; -- string[address, length] &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*address,command-line*</span> <span style="color: #fd971f; font-weight: bold;">*length,command-line*</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org56fe3b3" class="outline-3">
<h3 id="org56fe3b3">[init|get]-environment-variable-list</h3>
<div class="outline-text-3" id="text-org56fe3b3">
<ul class="org-ul">
<li><p>the size of /proc/&lt;pid&gt;/environ is limited to 4k</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">1024</span> <span style="color: #fd971f; font-weight: bold;">4</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*address,environment-variable-list*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">1024</span> <span style="color: #fd971f; font-weight: bold;">4</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*length,environment-variable-list*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">init-environment-variable-list</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:path-buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:path-buffer</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  get-pid write-number,fill-buffer <span style="color: #dc322f; font-weight: bold;">&gt;::pid-string</span>

  <span style="color: #e6db74;">"/proc/"</span> dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:add-to-cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #83EA83; font-weight: bold;">:add-to-cursor</span> <span style="color: #83EA83; font-weight: bold;">:cursor</span> add <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  <span style="color: #5CDD5C; font-weight: bold;">::pid-string</span> dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:add-to-cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #83EA83; font-weight: bold;">:add-to-cursor</span> <span style="color: #83EA83; font-weight: bold;">:cursor</span> add <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  <span style="color: #e6db74;">"/environ"</span> dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:add-to-cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #83EA83; font-weight: bold;">:add-to-cursor</span> <span style="color: #83EA83; font-weight: bold;">:cursor</span> add <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  <span style="color: #83EA83; font-weight: bold;">:path-buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:path-buffer</span> sub dup2 <span style="color: #dc322f; font-weight: bold;">&gt;::path</span>
  <span style="color: #ffffff; font-weight: bold;">port:</span>open <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (init-environment-variable-list) fail to open : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:port</span>

  <span style="color: #fd971f; font-weight: bold;">*address,environment-variable-list*</span>
  <span style="color: #fd971f; font-weight: bold;">*length,environment-variable-list*</span>
  <span style="color: #83EA83; font-weight: bold;">:port</span>
  <span style="color: #ffffff; font-weight: bold;">port:</span>read <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* (init-environment-variable-list) fail to read : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*length,environment-variable-list*</span> set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">get-environment-variable-list</span>
  <span style="color: #FF8888;">&lt;&lt; -- string[address, length] &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*address,environment-variable-list*</span>
  <span style="color: #fd971f; font-weight: bold;">*length,environment-variable-list*</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orga6768c" class="outline-3">
<h3 id="orga6768c">find-environment-variable</h3>
<div class="outline-text-3" id="text-orga6768c">
<ul class="org-ul">
<li><p>the string used to find an environment-variable</p><p>can not contain "="</p><p>no error handling on this</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">find-environment-variable,loop</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], cursor</span>
<span style="color: #FF8888;">     -- string[address, length], true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  dup
  get-environment-variable-list add
  <span style="color: #ffffff; font-weight: bold;">greater-than?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  compare-buffer not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">0</span> cursor<span style="color: #b0b1a3;">-&gt;</span>next-matching-byte add1
    <span style="color: #00ffff; font-weight: bold;">loop</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:length</span> add get-byte
  <span style="color: #e6db74;">"="</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #ffffff; font-weight: bold;">equal?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">0</span> cursor<span style="color: #b0b1a3;">-&gt;</span>next-matching-byte add1
    <span style="color: #00ffff; font-weight: bold;">loop</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:length</span> add add1 <span style="color: #FF8888;">&lt;&lt; over "=" &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:find-address</span>
  <span style="color: #83EA83; font-weight: bold;">:find-address</span> <span style="color: #fd971f; font-weight: bold;">0</span> cursor<span style="color: #b0b1a3;">-&gt;</span>next-matching-byte
  <span style="color: #83EA83; font-weight: bold;">:find-address</span> sub <span style="color: #FF4C4C; font-weight: bold;">&gt;:find-length</span>
  <span style="color: #83EA83; font-weight: bold;">:find-address</span>
  <span style="color: #83EA83; font-weight: bold;">:find-length</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">find-environment-variable</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length]</span>
<span style="color: #FF8888;">     -- string[address, length], true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  get-environment-variable-list drop
  find-environment-variable,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org644494" class="outline-3">
<h3 id="org644494">initialize system environment</h3>
<div class="outline-text-3" id="text-org644494">
<div class="org-src-container">

<pre class="src src-cicada-nymph">init-pid
init-command-line
init-environment-variable-list
</pre>
</div>
</div>
</div>

<div id="outline-container-orga2f2953" class="outline-3">
<h3 id="orga2f2953"><b>home-directory</b></h3>
<div class="outline-text-3" id="text-orga2f2953">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*home-directory*</span>
  <span style="color: #e6db74;">"HOME"</span> find-environment-variable
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2524544" class="outline-3">
<h3 id="org2524544">report:environment-variable</h3>
<div class="outline-text-3" id="text-org2524544">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">report:environment-variable,loop</span>
  <span style="color: #FF8888;">&lt;&lt; environment-variable-list[address, length]-- &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>

  <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffffff; font-weight: bold;">string:</span>find-byte drop add1 <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:address</span> sub <span style="color: #FF4C4C; font-weight: bold;">&gt;:length-of-one-variable</span>

  <span style="color: #83EA83; font-weight: bold;">:address</span>
  <span style="color: #83EA83; font-weight: bold;">:length-of-one-variable</span> sub1 .s .l

  <span style="color: #83EA83; font-weight: bold;">:cursor</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #83EA83; font-weight: bold;">:length-of-one-variable</span> sub
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">report:environment-variable</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  get-environment-variable-list
  <span style="color: #ffffff; font-weight: bold;">report:</span>environment-variable,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orge0fad06" class="outline-3">
<h3 id="orge0fad06">report:command-line</h3>
<div class="outline-text-3" id="text-orge0fad06">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">report:command-line,loop</span>
  <span style="color: #FF8888;">&lt;&lt; command-line[address, length] -- &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>word .s <span style="color: #fd971f; font-weight: bold;">32</span> .b
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">report:command-line</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  get-command-line
  <span style="color: #ffffff; font-weight: bold;">report:</span>command-line,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org9970b8e" class="outline-2">
<h2 id="org9970b8e">work-directory</h2>
<div class="outline-text-2" id="text-org9970b8e">
</div><div id="outline-container-org821ec53" class="outline-3">
<h3 id="org821ec53">work-directory:get</h3>
<div class="outline-text-3" id="text-org821ec53">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*buffer,work-directory*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">work-directory:get</span>
  <span style="color: #FF8888;">&lt;&lt; -- directory[address, length] &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">512</span>
  <span style="color: #fd971f; font-weight: bold;">*buffer,work-directory*</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*getcwd*</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> syscall
  dup <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (work-directory:get) fail"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">*buffer,work-directory*</span>
  swap
  sub1 <span style="color: #FF8888;">&lt;&lt; for the ending zero &gt;&gt;</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org26e440" class="outline-3">
<h3 id="org26e440">work-directory:change</h3>
<div class="outline-text-3" id="text-org26e440">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">work-directory:change</span>
  <span style="color: #FF8888;">&lt;&lt; directory-path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::directory-path</span>
  <span style="color: #5CDD5C; font-weight: bold;">::directory-path</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*chdir*</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> syscall
  dup <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (work-directory:change) fail"</span> .s .l
    <span style="color: #e6db74;">"  can not change the work directory into : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::directory-path</span> .s .l
    <span style="color: #e6db74;">"  thus the argument in the stack is not consumed"</span> .s .l
    <span style="color: #e6db74;">"  "</span> .s error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #5CDD5C; font-weight: bold;">::directory-path</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf3b7c2e" class="outline-3">
<h3 id="orgf3b7c2e">pwd</h3>
<div class="outline-text-3" id="text-orgf3b7c2e">
<ul class="org-ul">
<li><p>print work-directory</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">pwd</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #ffffff; font-weight: bold;">work-directory:</span>get .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgff52b87" class="outline-3">
<h3 id="orgff52b87">cd</h3>
<div class="outline-text-3" id="text-orgff52b87">
<ul class="org-ul">
<li><p>change work-directory</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #e6db74;">"cd"</span> <span style="color: #e6db74;">"work-directory:change"</span> alias
</pre>
</div>
</div>
</div>

<div id="outline-container-org4244939" class="outline-3">
<h3 id="org4244939"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org4244939">
<div class="org-src-container">

<pre class="src src-cicada-nymph">pwd
<span style="color: #e6db74;">"/home"</span> cd
pwd
<span style="color: #e6db74;">"/////home/xyh////cicada/play"</span> cd
pwd
<span style="color: #e6db74;">"//././/home/xyh/././cicada/./"</span> cd
pwd
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgf29e218" class="outline-2">
<h2 id="orgf29e218">path</h2>
<div class="outline-text-2" id="text-orgf29e218">
</div><div id="outline-container-org452d362" class="outline-3">
<h3 id="org452d362">system-stat</h3>
<div class="outline-text-3" id="text-org452d362">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,dev+</span>        <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,ino+</span>        <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,mode+</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,nlink+</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,uid+</span>        <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,gid+</span>        <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,rdev+</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,size+</span>       <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,blksize+</span>    <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,blocks+</span>     <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,atime+</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,atime_nsec+</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,mtime+</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,mtime_nsec+</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,ctime+</span>      <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,ctime_nsec+</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,__unused4+</span>     <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,__unused5+</span>     <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
<span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,end+</span>           <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">init,stat</span>
  <span style="color: #FF8888;">&lt;&lt; offset -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,dev+</span>        set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,ino+</span>        set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,mode+</span>       set <span style="color: #fd971f; font-weight: bold;">2</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,nlink+</span>      set <span style="color: #fd971f; font-weight: bold;">2</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,uid+</span>        set <span style="color: #fd971f; font-weight: bold;">2</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,gid+</span>        set <span style="color: #fd971f; font-weight: bold;">2</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,rdev+</span>       set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,size+</span>       set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,blksize+</span>    set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,blocks+</span>     set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,atime+</span>      set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,atime_nsec+</span> set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,mtime+</span>      set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,mtime_nsec+</span> set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,ctime+</span>      set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,ctime_nsec+</span> set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,__unused4+</span>     set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,__unused5+</span>     set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
        <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,end+</span>           set
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,dev+</span>        set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,ino+</span>        set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">    note the following order changing</span>
<span style="color: #FF8888;">    this is linux' bad</span>
<span style="color: #FF8888;">    &gt;&gt;</span>
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,nlink+</span>      set <span style="color: #fd971f; font-weight: bold;">8</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,mode+</span>       set <span style="color: #fd971f; font-weight: bold;">4</span> add

    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,uid+</span>        set <span style="color: #fd971f; font-weight: bold;">4</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,gid+</span>        set <span style="color: #fd971f; font-weight: bold;">4</span> add
                                         <span style="color: #fd971f; font-weight: bold;">4</span> add <span style="color: #FF8888;">&lt;&lt; padding &gt;&gt;</span>
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,rdev+</span>       set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,size+</span>       set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,blksize+</span>    set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,blocks+</span>     set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,atime+</span>      set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,atime_nsec+</span> set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,mtime+</span>      set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,mtime_nsec+</span> set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,ctime+</span>      set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,ctime_nsec+</span> set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,__unused4+</span>     set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
    dup <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,__unused5+</span>     set <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
        <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">+stat,end+</span>           set
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #fd971f; font-weight: bold;">0</span> init,stat
<span style="color: #fd971f; font-weight: bold;">+stat,end+</span> <span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+stat,length+</span> <span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org486d132" class="outline-3">
<h3 id="org486d132"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org486d132">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,stat</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length] -- &gt;&gt;</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">+stat,length+</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:stat-structure</span>
  <span style="color: #83EA83; font-weight: bold;">:stat-structure</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*stat*</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    dup .
    error-code<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop
  <span style="color: #83EA83; font-weight: bold;">:stat-structure</span> init,stat
  <span style="color: #e6db74;">"+stat,dev+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,dev+</span>        get . .l
  <span style="color: #e6db74;">"+stat,ino+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,ino+</span>        get . .l
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #e6db74;">"+stat,mode+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,mode+</span>       get-two-bytes  . .l
  <span style="color: #e6db74;">"+stat,nlink+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,nlink+</span>      get-two-bytes  . .l
  <span style="color: #e6db74;">"+stat,uid+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,uid+</span>        get-two-bytes  . .l
  <span style="color: #e6db74;">"+stat,gid+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,gid+</span>        get-two-bytes  . .l
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #e6db74;">"+stat,nlink+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,nlink+</span>      get  . .l
  <span style="color: #e6db74;">"+stat,mode+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,mode+</span>       get-four-bytes  . .l
  <span style="color: #e6db74;">"+stat,uid+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,uid+</span>        get-four-bytes  . .l
  <span style="color: #e6db74;">"+stat,gid+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,gid+</span>        get-four-bytes  . .l
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"+stat,rdev+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,rdev+</span>       get . .l
  <span style="color: #e6db74;">"+stat,size+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,size+</span>       get . .l
  <span style="color: #e6db74;">"+stat,blksize+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,blksize+</span>    get . .l
  <span style="color: #e6db74;">"+stat,blocks+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,blocks+</span>     get . .l
  <span style="color: #e6db74;">"+stat,atime+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,atime+</span>      get . .l
  <span style="color: #e6db74;">"+stat,atime_nsec+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,atime_nsec+</span> get . .l
  <span style="color: #e6db74;">"+stat,mtime+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,mtime+</span>      get . .l
  <span style="color: #e6db74;">"+stat,mtime_nsec+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,mtime_nsec+</span> get . .l
  <span style="color: #e6db74;">"+stat,ctime+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,ctime+</span>      get . .l
  <span style="color: #e6db74;">"+stat,ctime_nsec+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,ctime_nsec+</span> get . .l
  <span style="color: #e6db74;">"+stat,__unused4+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,__unused4+</span>     get . .l
  <span style="color: #e6db74;">"+stat,__unused5+ : "</span> .s <span style="color: #fd971f; font-weight: bold;">+stat,__unused5+</span>     get . .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #e6db74;">"cn"</span> test,stat
<span style="color: #e6db74;">"no"</span> test,stat
</pre>
</div>
</div>
</div>

<div id="outline-container-org7f30e1" class="outline-3">
<h3 id="org7f30e1"><span class="todo note">note</span> predicate</h3>
<div class="outline-text-3" id="text-org7f30e1">
<ul class="org-ul">
<li><p>to use predicate to know more about the file-tree</p><p>before calling a function that makes action on the file-tree</p></li></ul>
</div>
</div>

<div id="outline-container-org7df4b3d" class="outline-3">
<h3 id="org7df4b3d">path:nothing?</h3>
<div class="outline-text-3" id="text-org7df4b3d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">path:nothing?</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length] -- bool &gt;&gt;</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">+stat,length+</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:stat-structure</span>
  <span style="color: #83EA83; font-weight: bold;">:stat-structure</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*stat*</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> syscall
  <span style="color: #fd971f; font-weight: bold;">-2</span> <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orge4b55b5" class="outline-3">
<h3 id="orge4b55b5">path:file?</h3>
<div class="outline-text-3" id="text-orge4b55b5">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">path:file?</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length] -- bool &gt;&gt;</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">+stat,length+</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:stat-structure</span>
  <span style="color: #83EA83; font-weight: bold;">:stat-structure</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*stat*</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop
  <span style="color: #83EA83; font-weight: bold;">:stat-structure</span> init,stat
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">+stat,mode+</span>
    get-two-bytes
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">+stat,mode+</span>
    get-four-bytes
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">12</span> bit-right
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">0010</span>
  <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  0170000</span>
<span style="color: #FF8888;">  S_IFDIR       0040000 /* Directory.  */</span>
<span style="color: #FF8888;">  S_IFCHR       0020000 /* Character device.  */</span>
<span style="color: #FF8888;">  S_IFBLK       0060000 /* Block device.  */</span>
<span style="color: #FF8888;">  S_IFREG       0100000 /* Regular file.  */</span>
<span style="color: #FF8888;">  S_IFIFO       0010000 /* FIFO.  */</span>
<span style="color: #FF8888;">  S_IFLNK       0120000 /* Symbolic link.  */</span>
<span style="color: #FF8888;">  S_IFSOCK      0140000 /* Socket.  */</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org92d7663" class="outline-3">
<h3 id="org92d7663">path:directory?</h3>
<div class="outline-text-3" id="text-org92d7663">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">path:directory?</span>
  <span style="color: #FF8888;">&lt;&lt; path[address, length] -- bool &gt;&gt;</span>
  string<span style="color: #b0b1a3;">-&gt;</span>syscall-string
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">+stat,length+</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:stat-structure</span>
  <span style="color: #83EA83; font-weight: bold;">:stat-structure</span>
  <span style="color: #83EA83; font-weight: bold;">:syscall-path</span>
  <span style="color: #fd971f; font-weight: bold;">syscall-number:*stat*</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> syscall
  dup
  <span style="color: #ffffff; font-weight: bold;">negative?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop
  <span style="color: #83EA83; font-weight: bold;">:stat-structure</span> init,stat
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">+stat,mode+</span>
    get-two-bytes
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">+stat,mode+</span>
    get-four-bytes
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">12</span> bit-right
  <span style="color: #fd971f; font-weight: bold;">8</span><span style="color: #ffff00;">#</span><span style="color: #fd971f; font-weight: bold;">0004</span>
  <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">  0170000</span>
<span style="color: #FF8888;">  S_IFDIR       00040000 /* Directory.  */</span>
<span style="color: #FF8888;">  S_IFCHR       00020000 /* Character device.  */</span>
<span style="color: #FF8888;">  S_IFBLK       00060000 /* Block device.  */</span>
<span style="color: #FF8888;">  S_IFREG       00100000 /* Regular file.  */</span>
<span style="color: #FF8888;">  S_IFIFO       00010000 /* FIFO.  */</span>
<span style="color: #FF8888;">  S_IFLNK       00120000 /* Symbolic link.  */</span>
<span style="color: #FF8888;">  S_IFSOCK      00140000 /* Socket.  */</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org3f69b6e" class="outline-3">
<h3 id="org3f69b6e"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org3f69b6e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #e6db74;">"cn"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>nothing? . <span style="color: #FF8888;">&lt;&lt; 0 &gt;&gt;</span>
<span style="color: #e6db74;">"core"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>nothing? . <span style="color: #FF8888;">&lt;&lt; 0 &gt;&gt;</span>
<span style="color: #e6db74;">"ai"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>nothing? . <span style="color: #FF8888;">&lt;&lt; 1 &gt;&gt;</span>

<span style="color: #e6db74;">"cn"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>file? . <span style="color: #FF8888;">&lt;&lt; 1 &gt;&gt;</span>
<span style="color: #e6db74;">"core"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>file? . <span style="color: #FF8888;">&lt;&lt; 0 &gt;&gt;</span>
<span style="color: #e6db74;">"ai"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>file? . <span style="color: #FF8888;">&lt;&lt; 0 &gt;&gt;</span>

<span style="color: #e6db74;">"cn"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>directory? . <span style="color: #FF8888;">&lt;&lt; 0 &gt;&gt;</span>
<span style="color: #e6db74;">"core"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>directory? . <span style="color: #FF8888;">&lt;&lt; 1 &gt;&gt;</span>
<span style="color: #e6db74;">"ai"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>directory? . <span style="color: #FF8888;">&lt;&lt; 0 &gt;&gt;</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgcabdacb" class="outline-3">
<h3 id="orgcabdacb"><span class="todo _">記</span> 字符串的謂詞</h3>
<div class="outline-text-3" id="text-orgcabdacb">
<ul class="org-ul">
<li><p>下面這兩個函數</p><p>其實是在用遞歸函數實現正則表達式對字符串的匹配效果</p></li>
<li><p>是否應該設計 正則表達式 子語言 ?</p><p>還是總是直接使用遞歸函數 ?</p></li></ul>
</div>
</div>

<div id="outline-container-org21f4d0e" class="outline-3">
<h3 id="org21f4d0e"><span class="todo _">記</span> unix 路徑格式</h3>
<div class="outline-text-3" id="text-org21f4d0e">
<ul class="org-ul">
<li><p>"<i>" 相當於 空格</p><p>連續的 "/</i>" 相當於 連續的空格</p><p>這種空格使用在字符串開頭時 代表這是一個 絕對路徑</p></li>
<li><p>"." 相當於 空格</p><p>連續的 ".." 不算 連續的空格 有別的語義</p><p>但是在這種空格使用在最前面的時候 標誌這個</p><p>這種空格使用在字符串開頭時 代表這是一個 相對路徑</p></li>
<li><p>而對於下面的兩個函數我簡單地要求</p><p><ol class="org-ol"></p><p><li>relative-path</p><p>不以 "/" 開頭 的字符串</li></p><p><li>full-path</p><p>以 "/" 開頭 的字符串</li></p><p><li>並且在這裏我允許 path 內 出現空格</p><p>保留對這種路徑的處理能力</p><p>只不過 我不使用這種路徑而已</li></ol></p></li></ul>
</div>
</div>

<div id="outline-container-org988fe79" class="outline-3">
<h3 id="org988fe79">path:relative?</h3>
<div class="outline-text-3" id="text-org988fe79">
<ul class="org-ul">
<li><p>in ASCII "/" is 47</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">path:relative?</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- bool &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #fd971f; font-weight: bold;">47</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> not
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4985020" class="outline-3">
<h3 id="org4985020">path:full?</h3>
<div class="outline-text-3" id="text-org4985020">
<ul class="org-ul">
<li><p>in ASCII "/" is 47</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">path:full?</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- bool &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #fd971f; font-weight: bold;">47</span> <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd0c2c9e" class="outline-3">
<h3 id="orgd0c2c9e"><span class="done test">test</span> path:full?</h3>
<div class="outline-text-3" id="text-orgd0c2c9e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) path:full?"</span> .s .l
  <span style="color: #e6db74;">"/home"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>relative? <span style="color: #ffffff; font-weight: bold;">false?</span>
  <span style="color: #e6db74;">"/home"</span> <span style="color: #ffffff; font-weight: bold;">path:</span>full?     <span style="color: #ffffff; font-weight: bold;">true?</span> and
  <span style="color: #e6db74;">"home"</span>  <span style="color: #ffffff; font-weight: bold;">path:</span>relative? <span style="color: #ffffff; font-weight: bold;">true?</span> and
  <span style="color: #e6db74;">"home"</span>  <span style="color: #ffffff; font-weight: bold;">path:</span>full?     <span style="color: #ffffff; font-weight: bold;">false?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org77605be" class="outline-2">
<h2 id="org77605be">poi</h2>
<div class="outline-text-2" id="text-org77605be">
</div><div id="outline-container-org48f8bcd" class="outline-3">
<h3 id="org48f8bcd"><span class="todo _">記</span> </h3>
<div class="outline-text-3" id="text-org48f8bcd">
<ul class="org-ul">
<li><p>poi 是利用文件系統所實現的登記機制</p><p>所登記的 path 信息爲 path-syntax 所用</p></li>
<li><p>module 也是用文件系統所實現的登記機制</p><p>所登記的 path 信息爲 module 機制所用</p></li></ul>
</div>
</div>

<div id="outline-container-orgad4e8a6" class="outline-3">
<h3 id="orgad4e8a6"><span class="todo note">note</span> </h3>
<div class="outline-text-3" id="text-orgad4e8a6">
<ul class="org-ul">
<li><p>poi denotes path-organizer</p><p>it can give a name to a path</p><p>one path one name</p></li>
<li><p>a path as a string must not contain any space bytes</p></li>
<li><p>a name should only consist of number or letter or "-"</p></li></ul>
</div>
</div>

<div id="outline-container-orge444ec3" class="outline-3">
<h3 id="orge444ec3"><b>poi-directory</b></h3>
<div class="outline-text-3" id="text-orge444ec3">
<ul class="org-ul">
<li><p>one directory to store the name path record</p><p>"<i>home/&lt;user&gt;</i>.cicada/poi"</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*poi-directory,user,address*</span>
  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*poi-directory*</span>
  <span style="color: #fd971f; font-weight: bold;">*home-directory*</span> <span style="color: #e6db74;">"/.cicada/poi"</span>
  <span style="color: #fd971f; font-weight: bold;">*poi-directory,user,address*</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #fd971f; font-weight: bold;">*poi-directory,user,address*</span> swap
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2f42a30" class="outline-3">
<h3 id="org2f42a30">poi:find</h3>
<div class="outline-text-3" id="text-org2f42a30">
<ul class="org-ul">
<li><p>note that</p><p>this function uses <b>circular-string-area</b></p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">poi:find</span>
  <span style="color: #FF8888;">&lt;&lt; name[address, length]</span>
<span style="color: #FF8888;">     -- path[address, length], true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>
  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">*poi-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #e6db74;">"/path"</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">4</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">path:</span>file? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:read-buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:read-buffer</span> <span style="color: #fd971f; font-weight: bold;">512</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>read <span style="color: #FF4C4C; font-weight: bold;">&gt;:read-length</span>

  <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:path-address</span>

  <span style="color: #83EA83; font-weight: bold;">:read-buffer</span> <span style="color: #83EA83; font-weight: bold;">:read-length</span>
  circular-string-area,stay

  <span style="color: #83EA83; font-weight: bold;">:path-address</span>
  <span style="color: #83EA83; font-weight: bold;">:read-length</span>
  <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf51c0d2" class="outline-3">
<h3 id="orgf51c0d2">poi:add</h3>
<div class="outline-text-3" id="text-orgf51c0d2">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">poi:add</span>
  <span style="color: #FF8888;">&lt;&lt; name[address, length], relative-path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::relative-path</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>

  <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> <span style="color: #ffffff; font-weight: bold;">path:</span>relative? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (poi:add) the argument must be a relative-path"</span> .s .l
    <span style="color: #e6db74;">"  but the following is not : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> <span style="color: #ffffff; font-weight: bold;">path:</span>directory? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (poi:add) the argument must be a relative-path to a existing directory"</span> .s .l
    <span style="color: #e6db74;">"  but the following path is not to a directory : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (poi:add) can not add"</span> .s .l
    <span style="color: #e6db74;">"  for the following poi already exist : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
    <span style="color: #e6db74;">"  name is use as the following directory's name : "</span> .s .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">*poi-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>create

  <span style="color: #fd971f; font-weight: bold;">*poi-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #e6db74;">"/path"</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">4</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>create

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:address,full-path</span>
  <span style="color: #ffffff; font-weight: bold;">work-directory:</span>get <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span>
  <span style="color: #83EA83; font-weight: bold;">:address,full-path</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length,full-path</span>

  <span style="color: #83EA83; font-weight: bold;">:address,full-path</span> <span style="color: #83EA83; font-weight: bold;">:length,full-path</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>write
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org9a39b5" class="outline-3">
<h3 id="org9a39b5">poi:sub</h3>
<div class="outline-text-3" id="text-org9a39b5">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">poi:sub</span>
  <span style="color: #FF8888;">&lt;&lt; name[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>

  <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>find not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (poi:sub) can not sub"</span> .s .l
    <span style="color: #e6db74;">"  for the following poi does not exist : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::named-directory</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">*poi-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #e6db74;">"/path"</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">4</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>remove

  <span style="color: #fd971f; font-weight: bold;">*poi-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>remove
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org13c11cf" class="outline-3">
<h3 id="org13c11cf">poi:up</h3>
<div class="outline-text-3" id="text-org13c11cf">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">poi:up</span>
  <span style="color: #FF8888;">&lt;&lt; name[address, length], relative-path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::relative-path</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>

  <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> <span style="color: #ffffff; font-weight: bold;">path:</span>relative? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (poi:up) the argument must be a relative-path"</span> .s .l
    <span style="color: #e6db74;">"  but the following is not : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> <span style="color: #ffffff; font-weight: bold;">path:</span>directory? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (poi:up) the argument must be a relative-path to a existing directory"</span> .s .l
    <span style="color: #e6db74;">"  but the following directory is not exist : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>find not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (poi:up) can not up"</span> .s .l
    <span style="color: #e6db74;">"  for the following poi does not exist : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::named-directory</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">*poi-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #e6db74;">"/path"</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">4</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:address,full-path</span>
  <span style="color: #ffffff; font-weight: bold;">work-directory:</span>get <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span>
  <span style="color: #83EA83; font-weight: bold;">:address,full-path</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length,full-path</span>

  <span style="color: #83EA83; font-weight: bold;">:address,full-path</span> <span style="color: #83EA83; font-weight: bold;">:length,full-path</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>write
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd86f244" class="outline-3">
<h3 id="orgd86f244">poi:list</h3>
<div class="outline-text-3" id="text-orgd86f244">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">poi:list</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*poi-directory*</span>
  <span style="color: #93a8c6;">[</span> <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
    <span style="color: #fd971f; font-weight: bold;">+getdents64,type+</span> get-byte
    <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:path-buffer</span>
      <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span>
      dup <span style="color: #fd971f; font-weight: bold;">256</span>
      <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffffff; font-weight: bold;">string:</span>find-byte
      drop  <span style="color: #FF8888;">&lt;&lt; drop 0 &gt;&gt;</span>
      over sub <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>

      <span style="color: #e6db74;">".."</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
        <span style="color: #00ffff; font-weight: bold;">end</span>
      <span style="color: #f92672; font-weight: bold;">then</span>

      <span style="color: #e6db74;">"."</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
        <span style="color: #00ffff; font-weight: bold;">end</span>
      <span style="color: #f92672; font-weight: bold;">then</span>

      <span style="color: #e6db74;">"  * "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
      <span style="color: #e6db74;">"      "</span> .s

      <span style="color: #fd971f; font-weight: bold;">*poi-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #e6db74;">"/path"</span>
      <span style="color: #83EA83; font-weight: bold;">:path-buffer</span>
      <span style="color: #fd971f; font-weight: bold;">4</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:path-length</span>

      <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:reading-buffer</span>
      <span style="color: #83EA83; font-weight: bold;">:reading-buffer</span> <span style="color: #fd971f; font-weight: bold;">512</span>
      <span style="color: #83EA83; font-weight: bold;">:path-buffer</span> <span style="color: #83EA83; font-weight: bold;">:path-length</span>
      <span style="color: #ffffff; font-weight: bold;">file:</span>read <span style="color: #FF4C4C; font-weight: bold;">&gt;:reading-length</span>

      <span style="color: #83EA83; font-weight: bold;">:reading-buffer</span> <span style="color: #83EA83; font-weight: bold;">:reading-length</span>
      .s .l
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #93a8c6;">]</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>map
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org23a8903" class="outline-3">
<h3 id="org23a8903">poi:help</h3>
<div class="outline-text-3" id="text-org23a8903">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">poi:help</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"* (poi:help)"</span> .s .l
  <span style="color: #e6db74;">"  * cn poi add  &lt;new-name&gt; &lt;relative-path-to-existing-directory&gt;"</span> .s .l
  <span style="color: #e6db74;">"  * cn poi sub  &lt;old-name&gt;"</span> .s .l
  <span style="color: #e6db74;">"  * cn poi up   &lt;old-name&gt; &lt;relative-path-to-existing-directory&gt;"</span> .s .l
  <span style="color: #e6db74;">"  * cn poi find &lt;old-name&gt;"</span> .s .l
  <span style="color: #e6db74;">"  * cn poi list"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org120b9dc" class="outline-3">
<h3 id="org120b9dc"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org120b9dc">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #e6db74;">"./play"</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>add
<span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>find
<span style="color: #f92672; font-weight: bold;">if</span> .s .l
<span style="color: #f92672; font-weight: bold;">else</span> <span style="color: #e6db74;">"not found"</span> .s .l
<span style="color: #f92672; font-weight: bold;">then</span>

<span style="color: #e6db74;">"test-cicada-play-2"</span> <span style="color: #e6db74;">"./play-2"</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>add
<span style="color: #e6db74;">"test-cicada-play-2"</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>find
<span style="color: #f92672; font-weight: bold;">if</span> .s .l
<span style="color: #f92672; font-weight: bold;">else</span> <span style="color: #e6db74;">"not found"</span> .s .l
<span style="color: #f92672; font-weight: bold;">then</span>

<span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #e6db74;">"./contribution"</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>up
<span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>find
<span style="color: #f92672; font-weight: bold;">if</span> .s .l
<span style="color: #f92672; font-weight: bold;">else</span> <span style="color: #e6db74;">"not found"</span> .s .l
<span style="color: #f92672; font-weight: bold;">then</span>

<span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>sub
<span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>find
<span style="color: #f92672; font-weight: bold;">if</span> .s .l
<span style="color: #f92672; font-weight: bold;">else</span> <span style="color: #e6db74;">"not found"</span> .s .l
<span style="color: #f92672; font-weight: bold;">then</span>

<span style="color: #ffffff; font-weight: bold;">poi:</span>list

<span style="color: #ffffff; font-weight: bold;">poi:</span>help
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org8f6adeb" class="outline-2">
<h2 id="org8f6adeb">word-interpreter-syntax:path</h2>
<div class="outline-text-2" id="text-org8f6adeb">
</div><div id="outline-container-org9f6a099" class="outline-3">
<h3 id="org9f6a099"><del>word</del>?</h3>
<div class="outline-text-3" id="text-org9f6a099">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+word+?</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- bool &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">less-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  over get-byte
  <span style="color: #e6db74;">"+"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">equal?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  add sub1 get-byte
  <span style="color: #e6db74;">"+"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">equal?</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org73fc213" class="outline-3">
<h3 id="org73fc213"><del>word</del>-&gt;word</h3>
<div class="outline-text-3" id="text-org73fc213">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">+word+-&gt;word</span>
  <span style="color: #FF8888;">&lt;&lt; +word+[address, length] -- name[address, length] &gt;&gt;</span>
  sub2 swap
  add1 swap
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org8589d63" class="outline-3">
<h3 id="org8589d63"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org8589d63">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #e6db74;">"+work+"</span> <span style="color: #ffffff; font-weight: bold;">+word+?</span> .
<span style="color: #e6db74;">"work"</span> <span style="color: #ffffff; font-weight: bold;">+word+?</span> .
</pre>
</div>
</div>
</div>

<div id="outline-container-orga8a67ca" class="outline-3">
<h3 id="orga8a67ca"><span class="todo note">note</span> </h3>
<div class="outline-text-3" id="text-orga8a67ca">
<ul class="org-ul">
<li><p>path syntax can be implemented by a new <b>syntax-rule-set</b></p><p>but in the following</p><p>I just simply implemented it</p><p>as a syntax-rule in syntax-rule-set:*word-interpreter*</p></li></ul>
</div>
</div>

<div id="outline-container-orgda2207d" class="outline-3">
<h3 id="orgda2207d"><span class="todo note">note</span> format</h3>
<div class="outline-text-3" id="text-orgda2207d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">the following 4 poi are built in</span>
<span style="color: #FF8888;">+root+</span>
<span style="color: #FF8888;">+home+</span>
<span style="color: #FF8888;">+work+</span>
<span style="color: #FF8888;">+back+</span>
<span style="color: #FF8888;">&gt;&gt;</span>

<span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+root+</span> home xyh cicada core core.cn <span style="color: #ffff00; font-weight: bold;">;</span>
<span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+home+</span> cicada core core.cn <span style="color: #ffff00; font-weight: bold;">;</span>
<span style="color: #e6db74;">"/home/xyh/cicada/core/core.cn"</span>

<span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+back+</span> cicada core core.cn <span style="color: #ffff00; font-weight: bold;">;</span>
<span style="color: #e6db74;">"../cicada/core/core.cn"</span>

<span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+work+</span> core core.cn <span style="color: #ffff00; font-weight: bold;">;</span>
<span style="color: #a6e22e; font-weight: bold;">path:</span> core core.cn <span style="color: #ffff00; font-weight: bold;">;</span>


<span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+library+</span> hi.cn <span style="color: #ffff00; font-weight: bold;">;</span>
<span style="color: #e6db74;">"/home/xyh/cicada/library/hi.cn"</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org6fc106a" class="outline-3">
<h3 id="org6fc106a">path-syntax-word-&gt;path</h3>
<div class="outline-text-3" id="text-org6fc106a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">path-syntax-word-&gt;path</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- path[address, length] &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::word</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> <span style="color: #e6db74;">"+root+"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"/"</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> <span style="color: #e6db74;">"+work+"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">work-directory:</span>get
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> <span style="color: #e6db74;">"+home+"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">*home-directory*</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> <span style="color: #e6db74;">"+back+"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">".."</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> <span style="color: #ffffff; font-weight: bold;">+word+?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #5CDD5C; font-weight: bold;">::word</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> +word+<span style="color: #b0b1a3;">-&gt;</span>word <span style="color: #ffffff; font-weight: bold;">poi:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span>
  <span style="color: #fd971f; font-weight: bold;">'bad-path-syntax-word</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc10b36a" class="outline-3">
<h3 id="orgc10b36a">word-interpreter-syntax:path</h3>
<div class="outline-text-3" id="text-orgc10b36a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">bad-path-syntax-word,loop</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  read-word
  dup2 <span style="color: #e6db74;">";"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    .s <span style="color: #fd971f; font-weight: bold;">32</span> .b
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  .s <span style="color: #fd971f; font-weight: bold;">32</span> .b
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:path,loop</span>
  <span style="color: #FF8888;">&lt;&lt; cursor -- cursor &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  read-word <span style="color: #dc322f; font-weight: bold;">&gt;::word</span>

  <span style="color: #e6db74;">";"</span> <span style="color: #5CDD5C; font-weight: bold;">::word</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::word</span> path-syntax-word<span style="color: #b0b1a3;">-&gt;</span>path dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span>
  string<span style="color: #b0b1a3;">-&gt;</span>buffer!

  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:length</span> add
    dup
    <span style="color: #e6db74;">"/"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
    swap
    set-byte
  add1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">word-interpreter-syntax:path</span>
  <span style="color: #FF8888;">&lt;&lt; literal-word:path: -- path[address, length] &gt;&gt;</span>
  drop2

  <span style="color: #93a8c6;">[</span> <span style="color: #FF8888;">&lt;&lt; word -- &gt;&gt;</span>
    <span style="color: #e6db74;">"* (word-interpreter-syntax:path) the following word is of bad syntax : "</span> .s .l
    <span style="color: #e6db74;">"    "</span> .s .s .l
    action,reset-the-stack
    <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
    <span style="color: #e6db74;">"  the rest of the words in path syntax is as following :"</span> .s .l
    <span style="color: #e6db74;">"    "</span> .s bad-path-syntax-word,loop .l
    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #93a8c6;">]</span>
  <span style="color: #fd971f; font-weight: bold;">'bad-path-syntax-word</span> <span style="color: #1ef15f; font-weight: bold;">await</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>path,loop <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:buffer</span> sub <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span>
  circular-string-area,stay

  <span style="color: #83EA83; font-weight: bold;">:address</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5aa2e58" class="outline-3">
<h3 id="org5aa2e58">more,syntax-rule-set:basic-REPL</h3>
<div class="outline-text-3" id="text-org5aa2e58">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">more,syntax-rule-set:basic-REPL</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
  <span style="color: #93a8c6;">[</span><span style="color: #e6db74;">"path:"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #00ffff; font-weight: bold;">end</span><span style="color: #93a8c6;">]</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">word-interpreter-syntax:</span>path
  <span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
<span style="color: #ffffff; font-weight: bold;">more,syntax-rule-set:</span>basic-REPL
</pre>
</div>
</div>
</div>

<div id="outline-container-orgefab73b" class="outline-3">
<h3 id="orgefab73b"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-orgefab73b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+root+</span> home xyh cicada core core.cn <span style="color: #ffff00; font-weight: bold;">;</span> .s
<span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+home+</span> cicada core core.cn <span style="color: #ffff00; font-weight: bold;">;</span> .s

<span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+back+</span> cicada core core.cn <span style="color: #ffff00; font-weight: bold;">;</span> .s

<span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+work+</span> core core.cn <span style="color: #ffff00; font-weight: bold;">;</span> .s
<span style="color: #a6e22e; font-weight: bold;">path:</span> core core.cn <span style="color: #ffff00; font-weight: bold;">;</span> .s

<span style="color: #e6db74;">"module"</span> <span style="color: #e6db74;">"module"</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>add
<span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+module+</span> hi.cn <span style="color: #ffff00; font-weight: bold;">;</span> .s
<span style="color: #e6db74;">"module"</span> <span style="color: #ffffff; font-weight: bold;">poi:</span>sub
<span style="color: #FF8888;">&lt;&lt; error &gt;&gt;</span>
<span style="color: #a6e22e; font-weight: bold;">path:</span> <span style="color: #fd971f; font-weight: bold;">+module+</span> hi.cn <span style="color: #ffff00; font-weight: bold;">;</span>
</pre>
</div>
</div>
</div>
</div>


<div id="outline-container-org24b350" class="outline-2">
<h2 id="org24b350">string</h2>
<div class="outline-text-2" id="text-org24b350">
</div><div id="outline-container-orged13bbe" class="outline-3">
<h3 id="orged13bbe">string:full-of-the-same-byte?</h3>
<div class="outline-text-3" id="text-orged13bbe">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string:full-of-the-same-byte?</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length], byte -- bool &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:byte</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #83EA83; font-weight: bold;">:byte</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte-tail
  <span style="color: #83EA83; font-weight: bold;">:byte</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4b9fd18" class="outline-3">
<h3 id="org4b9fd18"><span class="done test">test</span> string:full-of-the-same-byte?</h3>
<div class="outline-text-3" id="text-org4b9fd18">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) string:full-of-the-same-byte?"</span> .s .l
  <span style="color: #e6db74;">"aaa"</span> <span style="color: #e6db74;">"a"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">string:</span>full-of-the-same-byte? <span style="color: #ffffff; font-weight: bold;">true?</span>
  <span style="color: #e6db74;">"aba"</span> <span style="color: #e6db74;">"a"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">string:</span>full-of-the-same-byte? <span style="color: #ffffff; font-weight: bold;">false?</span> add <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org3ee711" class="outline-3">
<h3 id="org3ee711">string:any-word</h3>
<div class="outline-text-3" id="text-org3ee711">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string:any-word</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length]</span>
<span style="color: #FF8888;">     function : &lt; word[address, length] -- bool &gt;</span>
<span style="color: #FF8888;">     -- bool &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:function</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word <span style="color: #83EA83; font-weight: bold;">:function</span> apply <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #83EA83; font-weight: bold;">:function</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org92f7859" class="outline-3">
<h3 id="org92f7859">string:every-word</h3>
<div class="outline-text-3" id="text-org92f7859">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string:every-word</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length]</span>
<span style="color: #FF8888;">     function : &lt; word[address, length] -- bool &gt;</span>
<span style="color: #FF8888;">     -- bool &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:function</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word <span style="color: #83EA83; font-weight: bold;">:function</span> apply not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::string</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #83EA83; font-weight: bold;">:function</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc60bb49" class="outline-3">
<h3 id="orgc60bb49"><span class="done test">test</span> string:every-word</h3>
<div class="outline-text-3" id="text-orgc60bb49">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string:every-word,testing</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"no no name no"</span>
  <span style="color: #93a8c6;">[</span><span style="color: #e6db74;">"name"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #00ffff; font-weight: bold;">end</span><span style="color: #93a8c6;">]</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>any-word <span style="color: #ffffff; font-weight: bold;">true?</span>

  <span style="color: #e6db74;">"name name name"</span>
  <span style="color: #93a8c6;">[</span><span style="color: #e6db74;">"name"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #00ffff; font-weight: bold;">end</span><span style="color: #93a8c6;">]</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>every-word <span style="color: #ffffff; font-weight: bold;">true?</span> and

  <span style="color: #e6db74;">"name name name"</span>
  <span style="color: #93a8c6;">[</span><span style="color: #e6db74;">"name"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? not <span style="color: #00ffff; font-weight: bold;">end</span><span style="color: #93a8c6;">]</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>every-word <span style="color: #ffffff; font-weight: bold;">false?</span> and

  <span style="color: #e6db74;">"no no name no"</span>
  <span style="color: #93a8c6;">[</span><span style="color: #e6db74;">"name"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #00ffff; font-weight: bold;">end</span><span style="color: #93a8c6;">]</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>every-word <span style="color: #ffffff; font-weight: bold;">false?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) string:every-word"</span> .s .l
  <span style="color: #ffffff; font-weight: bold;">string:</span>every-word,testing
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc8d9b3" class="outline-3">
<h3 id="orgc8d9b3">string:word-end-back</h3>
<div class="outline-text-3" id="text-orgc8d9b3">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string:word-end-back</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- string[address, length] &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">    no error handling</span>
<span style="color: #FF8888;">    the same empty-string is returned</span>
<span style="color: #FF8888;">    &gt;&gt;</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>byte-back
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">space-byte?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte-back
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4c7655b" class="outline-3">
<h3 id="org4c7655b">string:word-begin-back</h3>
<div class="outline-text-3" id="text-org4c7655b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string:word-begin-back,loop</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- string[address, length] &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">    no error handling</span>
<span style="color: #FF8888;">    the current empty-string is returned</span>
<span style="color: #FF8888;">    &gt;&gt;</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>byte-back
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">space-byte?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>byte-back
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">bar-ket-byte?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte-back
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string:word-begin-back</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- string[address, length] &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">    no error handling</span>
<span style="color: #FF8888;">    the same empty-string is returned</span>
<span style="color: #FF8888;">    &gt;&gt;</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>byte-back
  <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">bar-ket-byte?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">string:</span>byte-back
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-begin-back,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orge1faa5a" class="outline-3">
<h3 id="orge1faa5a">string:word-back</h3>
<div class="outline-text-3" id="text-orge1faa5a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">string:word-back</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- string[address, length] &gt;&gt;</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-end-back
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-begin-back
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd4adaa3" class="outline-3">
<h3 id="orgd4adaa3"><span class="done test">test</span> string:word-back</h3>
<div class="outline-text-3" id="text-orgd4adaa3">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) string:word-back"</span> .s .l
  <span style="color: #e6db74;">"   aaa   aaa   aaa"</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail dup2 <span style="color: #e6db74;">"   aaa   aaa"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-back dup2 <span style="color: #e6db74;">"aaa   aaa   aaa"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>word <span style="color: #e6db74;">"aaa"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org27388bd" class="outline-2">
<h2 id="org27388bd">reading-stack</h2>
<div class="outline-text-2" id="text-org27388bd">
</div><div id="outline-container-org7e4ec87" class="outline-3">
<h3 id="org7e4ec87">unread-word</h3>
<div class="outline-text-3" id="text-org7e4ec87">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">unread-word</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  pop-reading-stack
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-back
  push-reading-stack
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgbc5aeff" class="outline-3">
<h3 id="orgbc5aeff"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-orgbc5aeff">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">unread-word,test</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"type a word : "</span> .s
  read-word <span style="color: #e6db74;">"* read-word : "</span> .s .s .l
  unread-word
  read-word <span style="color: #e6db74;">"* read-word again : "</span> .s .s .l
  unread-word
  read-word <span style="color: #e6db74;">"* read-word again : "</span> .s .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
unread-word,test
</pre>
</div>
</div>
</div>
</div>


<div id="outline-container-orgf03c0d2" class="outline-2">
<h2 id="orgf03c0d2"><span class="todo _">記</span> 模塊</h2>
<div class="outline-text-2" id="text-orgf03c0d2">
</div><div id="outline-container-org9daa0c0" class="outline-3">
<h3 id="org9daa0c0">元數據 之 語法</h3>
<div class="outline-text-3" id="text-org9daa0c0">
<ul class="org-ul">
<li><p><p></p><p>舉例</p><p></p></p><p><div class="org-src-container"></p><p></p><p><pre class="src src-cicada-nymph"><span style="color: #ef5939; font-weight: bold;">:::::::::</span></p><p><span style="color: #a6e22e; font-weight: bold;">import:</span> combinator math</p><p><span style="color: #a6e22e; font-weight: bold;">module:</span> assembler</p><p><span style="color: #a6e22e; font-weight: bold;">do:</span> <span style="color: #e6db74;">"assembler loaded"</span> .s .l</p><p><span style="color: #ae81ff; font-weight: bold;">=========</span></p><p></pre></p><p></div></p></li>
<li><p>元數據中所包含的信息應該只和如何運行這個程序有關</p><p>因爲其他信息可能會在各個文件中重複</p><p>這些可能重複的信息應該另行保存</p></li>
<li><p>有了 元數據 之後</p><p>就可以對文件實現相對豐富的謂詞</p></li>
<li><p>元數據 中 所能包含的信息類型</p><p>還有聲明這些信息的語法</p><p>都是可以擴展的</p></li>
<li><p>語法關鍵詞都形如 "word:"</p><p>每次通過找下一個 "word:" 來確定其截止位置</p></li>
<li><p>遇不被識別的 "word:"</p><p>就忽略 而找到下一個 "word:"</p></li></ul>
</div>
</div>

<div id="outline-container-org7e3ff4a" class="outline-3">
<h3 id="org7e3ff4a">減載</h3>
<div class="outline-text-3" id="text-org7e3ff4a">
<ul class="org-ul">
<li><p>或者說 撤銷加載 (unload)</p><p>它利用 (undo) 來實現</p></li></ul>
</div>
</div>

<div id="outline-container-org6b25df9" class="outline-3">
<h3 id="org6b25df9">加載棧</h3>
<div class="outline-text-3" id="text-org6b25df9">
<ul class="org-ul">
<li><p>加載棧 記錄</p><p><ol class="org-ol"></p><p><li>所有被加載的模塊的信息[模塊元數據字符串]</li></p><p><li>模塊被加載的順序</li></p><p><li>被加載的模塊是被直接加載還是間接加載</li></p><p><li>時間 路徑 等等 其他根系統狀態有關的元數據</li></ol></p></li>
<li><p>(import) 就利用了這些信息</p><p>用以聞訊</p><p>同時</p><p>這些信息 也可以幫助實現詳細的 report</p></li></ul>
</div>
</div>

<div id="outline-container-org8096acd" class="outline-3">
<h3 id="org8096acd">模塊命名棧 與 全局命名棧</h3>
<div class="outline-text-3" id="text-org8096acd">
<ul class="org-ul">
<li><p>應該用兩種 命名棧</p><p>全局命名棧[global-naming-stack] 所有名字都沒有 模塊前綴</p><p>模塊命名棧[module-naming-stack] 所有名字都有 模塊前綴</p></li>
<li><p>加載模塊時入 global-naming-stack</p><p>之後統一移到 module-naming-stack</p><p>這樣就不必更改 定義者 的接口了</p><p>定義者 只要向 global-naming-stack 中入值 就行了</p><p>根 module-naming-stack 有關的操作 由其他函數 另行完成</p></li></ul>
</div>
</div>

<div id="outline-container-org7cd7bc1" class="outline-3">
<h3 id="org7cd7bc1">模塊與文件一一對應</h3>
<div class="outline-text-3" id="text-org7cd7bc1">
<ul class="org-ul">
<li><p>要求 模塊與文件一一對應</p><p>這種 對應關係 影響對模塊機制的理解與使用</p></li>
<li><p>在啓動時</p><p>解釋器不會加載 core 之外的任何 module</p></li>
<li><p>所加載者 爲模塊 而非文件</p><p>不用路徑來加載模塊</p><p>而預先登記其路徑 然後直接通過模塊名來加載</p></li>
<li><p>我提供 命令行函數 來幫助在啓動時加載模塊</p></li></ul>
</div>
</div>

<div id="outline-container-org86d2dbf" class="outline-3">
<h3 id="org86d2dbf">循環引入</h3>
<div class="outline-text-3" id="text-org86d2dbf">
<ul class="org-ul">
<li><p>爲了處理循環引入</p><p>我需要一個 importing-stack</p><p>用以記錄 模塊之網中 由一點之引入所形成的有向路</p><p>只要在增添新的有向邊的時候 不要形成圈 就行了</p></li></ul>
</div>
</div>
</div>

<div id="outline-container-orgc2f0790" class="outline-2">
<h2 id="orgc2f0790">module-naming-stack</h2>
<div class="outline-text-2" id="text-orgc2f0790">
</div><div id="outline-container-org3877aa4" class="outline-3">
<h3 id="org3877aa4"><span class="todo note">note</span> module-naming-stack</h3>
<div class="outline-text-3" id="text-org3877aa4">
<ul class="org-ul">
<li><p>(define-*) push</p><p>(undo) pop</p></li></ul>
</div>
</div>

<div id="outline-container-orgb7f58fe" class="outline-3">
<h3 id="orgb7f58fe"><span class="todo note">note</span> name-record</h3>
<div class="outline-text-3" id="text-orgb7f58fe">
<ul class="org-ul">
<li><p><b>module-naming-stack</b> contain name-record</p></li>
<li><p><p></p><p>structure</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">name-record</td></p><p><td class="org-left">old-jo</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">name</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">new-jo</td></p><p></tr></p><p></tbody></p><p></table></p></li></ul>
</div>
</div>

<div id="outline-container-orge8c5c27" class="outline-3">
<h3 id="orge8c5c27"><b>module-naming-stack</b></h3>
<div class="outline-text-3" id="text-orge8c5c27">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">100</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">3</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*unit*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">module-naming-stack:*size*</span>
<span style="color: #fd971f; font-weight: bold;">module-naming-stack:*unit*</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*module-naming-stack*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*module-naming-stack*</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org6c5c205" class="outline-2">
<h2 id="org6c5c205">moi</h2>
<div class="outline-text-2" id="text-org6c5c205">
</div><div id="outline-container-orgb4a61d5" class="outline-3">
<h3 id="orgb4a61d5"><span class="todo note">note</span> </h3>
<div class="outline-text-3" id="text-orgb4a61d5">
<ul class="org-ul">
<li><p>like &lt;poi&gt;</p></li></ul>
</div>
</div>

<div id="outline-container-org49bcb9d" class="outline-3">
<h3 id="org49bcb9d"><b>module-directory</b></h3>
<div class="outline-text-3" id="text-org49bcb9d">
<ul class="org-ul">
<li><p>one directory to store the name path record</p><p>"<i>home/&lt;user&gt;</i>.cicada/module"</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*module-directory,user,address*</span>
  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*module-directory*</span>
  <span style="color: #fd971f; font-weight: bold;">*home-directory*</span> <span style="color: #e6db74;">"/.cicada/moi"</span>
  <span style="color: #fd971f; font-weight: bold;">*module-directory,user,address*</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #fd971f; font-weight: bold;">*module-directory,user,address*</span> swap
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org9a831ee" class="outline-3">
<h3 id="org9a831ee">moi:find</h3>
<div class="outline-text-3" id="text-org9a831ee">
<ul class="org-ul">
<li><p>note that</p><p>this function uses <b>circular-string-area</b></p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">moi:find</span>
  <span style="color: #FF8888;">&lt;&lt; name[address, length]</span>
<span style="color: #FF8888;">     -- path[address, length], true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>
  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">*module-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #e6db74;">"/path"</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">4</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">path:</span>file? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:read-buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:read-buffer</span> <span style="color: #fd971f; font-weight: bold;">512</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>read <span style="color: #FF4C4C; font-weight: bold;">&gt;:read-length</span>

  <span style="color: #fd971f; font-weight: bold;">*circular-string-area,current-free-address*</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:path-address</span>

  <span style="color: #83EA83; font-weight: bold;">:read-buffer</span> <span style="color: #83EA83; font-weight: bold;">:read-length</span>
  circular-string-area,stay

  <span style="color: #83EA83; font-weight: bold;">:path-address</span>
  <span style="color: #83EA83; font-weight: bold;">:read-length</span>
  <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org6107b66" class="outline-3">
<h3 id="org6107b66">moi:add</h3>
<div class="outline-text-3" id="text-org6107b66">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">moi:add</span>
  <span style="color: #FF8888;">&lt;&lt; name[address, length], relative-path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::relative-path</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>

  <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> <span style="color: #ffffff; font-weight: bold;">path:</span>relative? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (moi:add) the argument must be a relative-path"</span> .s .l
    <span style="color: #e6db74;">"  but the following is not : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> <span style="color: #ffffff; font-weight: bold;">path:</span>file? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (moi:add) the argument must be a relative-path to a existing file"</span> .s .l
    <span style="color: #e6db74;">"  but the following path is not to a file : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (moi:add) can not add"</span> .s .l
    <span style="color: #e6db74;">"  for the following module already exist : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
    <span style="color: #e6db74;">"  name is use as the following directory's name : "</span> .s .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">*module-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>create

  <span style="color: #fd971f; font-weight: bold;">*module-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #e6db74;">"/path"</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">4</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>create

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:address,full-path</span>
  <span style="color: #ffffff; font-weight: bold;">work-directory:</span>get <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span>
  <span style="color: #83EA83; font-weight: bold;">:address,full-path</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length,full-path</span>

  <span style="color: #83EA83; font-weight: bold;">:address,full-path</span> <span style="color: #83EA83; font-weight: bold;">:length,full-path</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>write
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org6813736" class="outline-3">
<h3 id="org6813736">moi:sub</h3>
<div class="outline-text-3" id="text-org6813736">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">moi:sub</span>
  <span style="color: #FF8888;">&lt;&lt; name[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>

  <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>find not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (moi:sub) can not sub"</span> .s .l
    <span style="color: #e6db74;">"  for the following module does not exist : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::named-directory</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">*module-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #e6db74;">"/path"</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">4</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>remove

  <span style="color: #fd971f; font-weight: bold;">*module-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer!
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>remove
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org3b58c87" class="outline-3">
<h3 id="org3b58c87">moi:up</h3>
<div class="outline-text-3" id="text-org3b58c87">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">moi:up</span>
  <span style="color: #FF8888;">&lt;&lt; name[address, length], relative-path[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::relative-path</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>

  <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> <span style="color: #ffffff; font-weight: bold;">path:</span>relative? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (moi:up) the argument must be a relative-path"</span> .s .l
    <span style="color: #e6db74;">"  but the following is not : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> <span style="color: #ffffff; font-weight: bold;">path:</span>file? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (moi:up) the argument must be a relative-path to a existing file"</span> .s .l
    <span style="color: #e6db74;">"  but the following file is not exist : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>find not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (moi:up) can not up"</span> .s .l
    <span style="color: #e6db74;">"  for the following module does not exist : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::named-directory</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">*module-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #e6db74;">"/path"</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">4</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:address,full-path</span>
  <span style="color: #ffffff; font-weight: bold;">work-directory:</span>get <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::relative-path</span>
  <span style="color: #83EA83; font-weight: bold;">:address,full-path</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length,full-path</span>

  <span style="color: #83EA83; font-weight: bold;">:address,full-path</span> <span style="color: #83EA83; font-weight: bold;">:length,full-path</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>write
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org6eb2cba" class="outline-3">
<h3 id="org6eb2cba">moi:list</h3>
<div class="outline-text-3" id="text-org6eb2cba">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">moi:list</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*module-directory*</span>
  <span style="color: #93a8c6;">[</span> <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
    <span style="color: #fd971f; font-weight: bold;">+getdents64,type+</span> get-byte
    <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
      <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:path-buffer</span>
      <span style="color: #fd971f; font-weight: bold;">+getdents64,name+</span>
      dup <span style="color: #fd971f; font-weight: bold;">256</span>
      <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffffff; font-weight: bold;">string:</span>find-byte
      drop  <span style="color: #FF8888;">&lt;&lt; drop 0 &gt;&gt;</span>
      over sub <span style="color: #dc322f; font-weight: bold;">&gt;::name</span>

      <span style="color: #e6db74;">".."</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
        <span style="color: #00ffff; font-weight: bold;">end</span>
      <span style="color: #f92672; font-weight: bold;">then</span>

      <span style="color: #e6db74;">"."</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
        <span style="color: #00ffff; font-weight: bold;">end</span>
      <span style="color: #f92672; font-weight: bold;">then</span>

      <span style="color: #e6db74;">"  * "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::name</span> .s .l
      <span style="color: #e6db74;">"      "</span> .s

      <span style="color: #fd971f; font-weight: bold;">*module-directory*</span> <span style="color: #e6db74;">"/"</span> <span style="color: #5CDD5C; font-weight: bold;">::name</span> <span style="color: #e6db74;">"/path"</span>
      <span style="color: #83EA83; font-weight: bold;">:path-buffer</span>
      <span style="color: #fd971f; font-weight: bold;">4</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:path-length</span>

      <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:reading-buffer</span>
      <span style="color: #83EA83; font-weight: bold;">:reading-buffer</span> <span style="color: #fd971f; font-weight: bold;">512</span>
      <span style="color: #83EA83; font-weight: bold;">:path-buffer</span> <span style="color: #83EA83; font-weight: bold;">:path-length</span>
      <span style="color: #ffffff; font-weight: bold;">file:</span>read <span style="color: #FF4C4C; font-weight: bold;">&gt;:reading-length</span>

      <span style="color: #83EA83; font-weight: bold;">:reading-buffer</span> <span style="color: #83EA83; font-weight: bold;">:reading-length</span>
      .s .l
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #93a8c6;">]</span>
  <span style="color: #ffffff; font-weight: bold;">directory:</span>map
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orga1f7d71" class="outline-3">
<h3 id="orga1f7d71">moi:help</h3>
<div class="outline-text-3" id="text-orga1f7d71">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">moi:help</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"* (moi:help)"</span> .s .l
  <span style="color: #e6db74;">"  * cn moi add  &lt;new-module-name&gt;      &lt;relative-path-to-existing-file&gt;"</span> .s .l
  <span style="color: #e6db74;">"  * cn moi sub  &lt;existing-module-name&gt;"</span> .s .l
  <span style="color: #e6db74;">"  * cn moi up   &lt;existing-module-name&gt; &lt;relative-path-to-existing-file&gt;"</span> .s .l
  <span style="color: #e6db74;">"  * cn moi find &lt;existing-module-name&gt;"</span> .s .l
  <span style="color: #e6db74;">"  * cn moi list"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org6dfaac6" class="outline-3">
<h3 id="org6dfaac6"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org6dfaac6">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #e6db74;">"./play"</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>add
<span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>find
<span style="color: #f92672; font-weight: bold;">if</span> .s .l
<span style="color: #f92672; font-weight: bold;">else</span> <span style="color: #e6db74;">"not found"</span> .s .l
<span style="color: #f92672; font-weight: bold;">then</span>

<span style="color: #e6db74;">"test-cicada-play-2"</span> <span style="color: #e6db74;">"./play-2"</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>add
<span style="color: #e6db74;">"test-cicada-play-2"</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>find
<span style="color: #f92672; font-weight: bold;">if</span> .s .l
<span style="color: #f92672; font-weight: bold;">else</span> <span style="color: #e6db74;">"not found"</span> .s .l
<span style="color: #f92672; font-weight: bold;">then</span>

<span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #e6db74;">"./contribution"</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>up
<span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>find
<span style="color: #f92672; font-weight: bold;">if</span> .s .l
<span style="color: #f92672; font-weight: bold;">else</span> <span style="color: #e6db74;">"not found"</span> .s .l
<span style="color: #f92672; font-weight: bold;">then</span>

<span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>sub
<span style="color: #e6db74;">"test-cicada-play"</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>find
<span style="color: #f92672; font-weight: bold;">if</span> .s .l
<span style="color: #f92672; font-weight: bold;">else</span> <span style="color: #e6db74;">"not found"</span> .s .l
<span style="color: #f92672; font-weight: bold;">then</span>

<span style="color: #ffffff; font-weight: bold;">moi:</span>list

<span style="color: #ffffff; font-weight: bold;">moi:</span>help
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org2679354" class="outline-2">
<h2 id="org2679354">module-stack &amp; module-info</h2>
<div class="outline-text-2" id="text-org2679354">
</div><div id="outline-container-orgbe0f348" class="outline-3">
<h3 id="orgbe0f348"><span class="todo _">記</span> 用法</h3>
<div class="outline-text-3" id="text-orgbe0f348">
<ul class="org-ul">
<li><p>遞歸引入</p><p>返回時入此棧</p></li>
<li><p>其中保存的值用於問詢引入的模塊之狀態</p><p>比如 記錄是否帶有測試加載</p><p>比如 記錄測試成功與失敗的次數</p></li></ul>
</div>
</div>

<div id="outline-container-org730b5f3" class="outline-3">
<h3 id="org730b5f3"><b>module-stack</b></h3>
<div class="outline-text-3" id="text-org730b5f3">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">module-stack:*size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">module-stack:*unit*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">module-stack:*size*</span>
<span style="color: #fd971f; font-weight: bold;">module-stack:*unit*</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*module-stack*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*module-stack*</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc17a60b" class="outline-3">
<h3 id="orgc17a60b"><span class="todo note">note</span> &lt;module-info&gt;</h3>
<div class="outline-text-3" id="text-orgc17a60b">
<ul class="org-ul">
<li><p><b>module-stack</b> contain module-info</p></li>
<li><p><p></p><p>structure</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">module-info</td></p><p><td class="org-left">meta-string address</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">meta-string length</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">name</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">name-record-begin</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">name-record-end</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">tested-flag</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">success-counter</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">fail-counter</td></p><p></tr></p><p></tbody></p><p></table></p></li></ul>
</div>
</div>

<div id="outline-container-org96b8127" class="outline-3">
<h3 id="org96b8127">module-<a href="[get|set]-meta-string.html#Top">[get|set]-meta-string</a></h3>
<div class="outline-text-3" id="text-org96b8127">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:get-meta-string</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- meta-string[address, length] &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">2</span> n-get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:set-meta-string</span>
  <span style="color: #FF8888;">&lt;&lt; meta-string[address, length], module-info -- &gt;&gt;</span>
  xx<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>x make-string x<span style="color: #b0b1a3;">|</span>swap<span style="color: #b0b1a3;">|</span>xx
  <span style="color: #fd971f; font-weight: bold;">2</span> n-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd8d9843" class="outline-3">
<h3 id="orgd8d9843">module-<a href="[get|set]-name.html#Top">[get|set]-name</a></h3>
<div class="outline-text-3" id="text-orgd8d9843">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:get-name</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- name &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:set-name</span>
  <span style="color: #FF8888;">&lt;&lt; name, module-info -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgcf169a0" class="outline-3">
<h3 id="orgcf169a0">module-<a href="[get|set]-name-record-begin.html#Top">[get|set]-name-record-begin</a></h3>
<div class="outline-text-3" id="text-orgcf169a0">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:get-name-record-begin</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- name &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">3</span> mul add
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:set-name-record-begin</span>
  <span style="color: #FF8888;">&lt;&lt; name, module-info -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">3</span> mul add
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org1ce750d" class="outline-3">
<h3 id="org1ce750d">module-<a href="[get|set]-name-record-end.html#Top">[get|set]-name-record-end</a></h3>
<div class="outline-text-3" id="text-org1ce750d">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:get-name-record-end</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- name &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> mul add
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:set-name-record-end</span>
  <span style="color: #FF8888;">&lt;&lt; name, module-info -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> mul add
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgce75b5c" class="outline-3">
<h3 id="orgce75b5c">module-<a href="[get|set]-tested-flag.html#Top">[get|set]-tested-flag</a></h3>
<div class="outline-text-3" id="text-orgce75b5c">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:get-tested-flag</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- name &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">5</span> mul add
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:set-tested-flag</span>
  <span style="color: #FF8888;">&lt;&lt; name, module-info -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">5</span> mul add
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orge477951" class="outline-3">
<h3 id="orge477951">module-<a href="[get|set|inc]-success-counter.html#Top">[get|set|inc]-success-counter</a></h3>
<div class="outline-text-3" id="text-orge477951">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:get-success-counter</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- name &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">6</span> mul add
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:set-success-counter</span>
  <span style="color: #FF8888;">&lt;&lt; name, module-info -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">6</span> mul add
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:inc-success-counter</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">6</span> mul add
  <span style="color: #fd971f; font-weight: bold;">1</span> swap
  add-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org7fa7b71" class="outline-3">
<h3 id="org7fa7b71">module-<a href="[get|set|inc]-fail-counter.html#Top">[get|set|inc]-fail-counter</a></h3>
<div class="outline-text-3" id="text-org7fa7b71">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:get-fail-counter</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- name &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">7</span> mul add
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:set-fail-counter</span>
  <span style="color: #FF8888;">&lt;&lt; name, module-info -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">7</span> mul add
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-info:inc-fail-counter</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">7</span> mul add
  <span style="color: #fd971f; font-weight: bold;">1</span> swap
  add-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org8e9af70" class="outline-3">
<h3 id="org8e9af70">module-stack:find</h3>
<div class="outline-text-3" id="text-org8e9af70">
<ul class="org-ul">
<li><p>from the base to the pointer</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-stack:find,loop</span>
  <span style="color: #FF8888;">&lt;&lt; name, cursor</span>
<span style="color: #FF8888;">     -- module-info, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name
  <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">module-stack:*unit*</span> add
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-stack:find</span>
  <span style="color: #FF8888;">&lt;&lt; name</span>
<span style="color: #FF8888;">     -- module-info, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*module-stack*</span>
  <span style="color: #ffffff; font-weight: bold;">module-stack:</span>find,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orga51c27d" class="outline-2">
<h2 id="orga51c27d">importing-stack &amp; importing-record</h2>
<div class="outline-text-2" id="text-orga51c27d">
</div><div id="outline-container-org8a303dc" class="outline-3">
<h3 id="org8a303dc"><span class="todo _">記</span> 用法</h3>
<div class="outline-text-3" id="text-org8a303dc">
<ul class="org-ul">
<li><p>遞歸引入</p><p>展開時入此棧</p><p>返回時出此棧</p></li>
<li><p>其中保存的值</p><p>在 eval-string 的過程中可以用到</p><p>比如 探測循環引入</p><p>比如 記錄當前的模塊是否帶測試引入</p></li></ul>
</div>
</div>

<div id="outline-container-orgc5fd998" class="outline-3">
<h3 id="orgc5fd998"><b>importing-stack</b> &amp; <b>testing-flag</b></h3>
<div class="outline-text-3" id="text-orgc5fd998">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">10</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">importing-stack:*size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span> drop
<span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*testing-flag*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">importing-stack:*size*</span>
<span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*importing-stack*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*importing-stack*</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org6c361b3" class="outline-3">
<h3 id="org6c361b3"><span class="todo note">note</span> &lt;importing-record&gt;</h3>
<div class="outline-text-3" id="text-org6c361b3">
<ul class="org-ul">
<li><p><p></p><p>structure</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">importing-record</td></p><p><td class="org-left">name</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">testing-flag</td></p><p></tr></p><p></tbody></p><p></table></p></li></ul>
</div>
</div>

<div id="outline-container-orgd817a4b" class="outline-3">
<h3 id="orgd817a4b">importing-record:[get|set]-name</h3>
<div class="outline-text-3" id="text-orgd817a4b">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">importing-record:get-name</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- name &gt;&gt;</span>
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">importing-record:set-name</span>
  <span style="color: #FF8888;">&lt;&lt; name, module-info -- &gt;&gt;</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2d48320" class="outline-3">
<h3 id="org2d48320">importing-record:[get|set]-testing-flag</h3>
<div class="outline-text-3" id="text-org2d48320">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">importing-record:get-testing-flag</span>
  <span style="color: #FF8888;">&lt;&lt; module-info -- bool &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">importing-record:set-testing-flag</span>
  <span style="color: #FF8888;">&lt;&lt; bool, module-info -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org502de20" class="outline-3">
<h3 id="org502de20">importing-stack:find</h3>
<div class="outline-text-3" id="text-org502de20">
<ul class="org-ul">
<li><p>from the base to the pointer</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">importing-stack:find,loop</span>
  <span style="color: #FF8888;">&lt;&lt; name, cursor</span>
<span style="color: #FF8888;">     -- importing-record, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #ffffff; font-weight: bold;">importing-record:</span>get-name
  <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span>
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span> add
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">importing-stack:find</span>
  <span style="color: #FF8888;">&lt;&lt; name</span>
<span style="color: #FF8888;">     -- importing-record, true</span>
<span style="color: #FF8888;">     -- false &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*importing-stack*</span>
  <span style="color: #ffffff; font-weight: bold;">importing-stack:</span>find,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf0b7553" class="outline-3">
<h3 id="orgf0b7553">importing-stack:drop</h3>
<div class="outline-text-3" id="text-orgf0b7553">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">importing-stack:drop</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span> sub-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgbb625db" class="outline-3">
<h3 id="orgbb625db">t</h3>
<div class="outline-text-3" id="text-orgbb625db">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">t</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*testing-flag*</span> get <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #fd971f; font-weight: bold;">*testing-flag*</span> set
    <span style="color: #e6db74;">"* (testing) *testing-flag* off"</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #fd971f; font-weight: bold;">*testing-flag*</span> set
    <span style="color: #e6db74;">"* (testing) *testing-flag* on"</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org41245ba" class="outline-2">
<h2 id="org41245ba">global-naming-stack &amp; module-naming-stack</h2>
<div class="outline-text-2" id="text-org41245ba">
</div><div id="outline-container-org8dbc3f9" class="outline-3">
<h3 id="org8dbc3f9">---------------------------------</h3>
</div>

<div id="outline-container-org6952966" class="outline-3">
<h3 id="org6952966"><span class="todo _">記</span> 接口</h3>
<div class="outline-text-3" id="text-org6952966">
<ul class="org-ul">
<li><p>每個 模塊 都對應於 module-naming-stack 中的兩個 name-record</p><p>一個開始</p><p>一個結束</p><p>因此接口就要圍繞這對值來設計</p></li>
<li><p>undo 中關於 global-naming-stack 和 module-naming-stack 的部分</p><p>可以利用這裏的接口</p></li>
<li><p>(clear-naming)</p><p>name-record-begin &lt;&#x2013; name-record-end</p><p>(prefix-naming)</p><p>name-record-begin &#x2013;&gt; name-record-end</p><p>(expose-naming)</p><p>name-record-begin &#x2013;&gt; name-record-end</p></li></ul>
</div>
</div>

<div id="outline-container-orgc5c7330" class="outline-3">
<h3 id="orgc5c7330">---------------------------------</h3>
</div>

<div id="outline-container-org8e874a1" class="outline-3">
<h3 id="org8e874a1">module-naming-stack:record-jo</h3>
<div class="outline-text-3" id="text-org8e874a1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-naming-stack:record-jo</span>
  <span style="color: #FF8888;">&lt;&lt; jo, name -- &gt;&gt;</span>
  dup name,get-jo
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>set-old-jo
  dup2 name,set-jo
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>set-name
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>set-new-jo
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> add-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5bdaada" class="outline-3">
<h3 id="org5bdaada">module-naming-stack:delete-last-record</h3>
<div class="outline-text-3" id="text-org5bdaada">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-naming-stack:delete-last-record</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*unit*</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span>
  sub-set
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-old-jo
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-name
  name,set-jo
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org1dee994" class="outline-3">
<h3 id="org1dee994">---------------------------------</h3>
</div>

<div id="outline-container-orga021c96" class="outline-3">
<h3 id="orga021c96">global-naming-stack:clear-naming</h3>
<div class="outline-text-3" id="text-orga021c96">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">global-naming-stack:clear-naming</span>
  <span style="color: #FF8888;">&lt;&lt; name-record-begin, name-record-end -- &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*unit*</span> sub
  dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:name-record</span>
  <span style="color: #83EA83; font-weight: bold;">:name-record</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-old-jo
  <span style="color: #83EA83; font-weight: bold;">:name-record</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-name
  name,set-jo
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org6cda8dc" class="outline-3">
<h3 id="org6cda8dc">module-naming-stack:clear-naming</h3>
<div class="outline-text-3" id="text-org6cda8dc">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-naming-stack:clear-naming</span>
  <span style="color: #FF8888;">&lt;&lt; name-record-begin, name-record-end -- &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*unit*</span> sub
  dup <span style="color: #FF4C4C; font-weight: bold;">&gt;:name-record</span>
  <span style="color: #83EA83; font-weight: bold;">:name-record</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-old-jo
  <span style="color: #83EA83; font-weight: bold;">:name-record</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-name
  name,set-jo
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2354d9d" class="outline-3">
<h3 id="org2354d9d">---------------------------------</h3>
</div>

<div id="outline-container-orgda632ae" class="outline-3">
<h3 id="orgda632ae">global-naming-stack:prefix-naming</h3>
<div class="outline-text-3" id="text-orgda632ae">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">global-naming-stack:prefix-naming</span>
  <span style="color: #FF8888;">&lt;&lt; name-record-begin, name-record-end, prefix[name-index] -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:prefix</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:end</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:begin</span>
  <span style="color: #83EA83; font-weight: bold;">:end</span> <span style="color: #83EA83; font-weight: bold;">:begin</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:prefix</span> name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #e6db74;">" "</span> <span style="color: #83EA83; font-weight: bold;">:begin</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-name name<span style="color: #b0b1a3;">-&gt;</span>string
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #83EA83; font-weight: bold;">:begin</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-new-jo
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> string<span style="color: #b0b1a3;">-&gt;</span>name
  <span style="color: #ffffff; font-weight: bold;">module-naming-stack:</span>record-jo

  <span style="color: #83EA83; font-weight: bold;">:begin</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*unit*</span> add
  <span style="color: #83EA83; font-weight: bold;">:end</span>
  <span style="color: #83EA83; font-weight: bold;">:prefix</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd9015ba" class="outline-3">
<h3 id="orgd9015ba">module-naming-stack:expose-naming</h3>
<div class="outline-text-3" id="text-orgd9015ba">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-naming-stack:expose-naming</span>
  <span style="color: #FF8888;">&lt;&lt; name-record-begin, name-record-end -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:end</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:begin</span>
  <span style="color: #83EA83; font-weight: bold;">:end</span> <span style="color: #83EA83; font-weight: bold;">:begin</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #83EA83; font-weight: bold;">:begin</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-new-jo
  <span style="color: #83EA83; font-weight: bold;">:begin</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-name
  name<span style="color: #b0b1a3;">-&gt;</span>string
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #ffffff; font-weight: bold;">string:</span>byte-tail
  string<span style="color: #b0b1a3;">-&gt;</span>name
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>record-jo

  <span style="color: #83EA83; font-weight: bold;">:begin</span> <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*unit*</span> add
  <span style="color: #83EA83; font-weight: bold;">:end</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgaa6de66" class="outline-3">
<h3 id="orgaa6de66">---------------------------------</h3>
</div>
</div>

<div id="outline-container-orgd66e866" class="outline-2">
<h2 id="orgd66e866">undo</h2>
<div class="outline-text-2" id="text-orgd66e866">
</div><div id="outline-container-org5fc022f" class="outline-3">
<h3 id="org5fc022f"><span class="todo _">記</span> 撤銷</h3>
<div class="outline-text-3" id="text-org5fc022f">
<ul class="org-ul">
<li><p>因爲 name-hash-table 的存在</p><p>導致我實現 undo 這個特性的機制</p><p>必須是去記錄差別 而不能是記錄歷史</p></li>
<li><p>具體地</p><p>在每個 undo-point 之後</p><p>所有對 jo 的 redefine 都需要被記錄</p><p>在需要退回到這個 undo-point 之時</p><p>恢復這些被從 name-hash-table 中踢出去的 jo</p></li>
<li><p>這樣</p><p>每一個 jo 被踢出 name-hash-table 時</p><p>會存入 jo name 的對子在 undo-stack 中</p></li>
<li><p>注意</p><p>每一次重新定義都對應一次恢復</p><p><ul class="org-ul"></p><p><li><p>缺點是</p><p>這樣 在兩個 undo-point 之間 對一個 jo 的多次重複定義</p><p>就帶來了一些沒必要的恢復</p></li></p><p><li><p>優點是</p><p>這樣就避免了對 多次重複定義的 jo 的特殊處理</p><p>不論是在效率上</p><p>還是實現的簡潔性上</p><p>這種實現方式都是更優的</p></li></ul></p></li></ul>
</div>
</div>

<div id="outline-container-orga5ddb88" class="outline-3">
<h3 id="orga5ddb88"><span class="todo note">note</span> global states</h3>
<div class="outline-text-3" id="text-orga5ddb88">
<ul class="org-ul">
<li><p>jojo-area</p></li>
<li><p>string-area</p></li>
<li><p>name-hash-table</p></li>
<li><p>global-naming-stack</p></li>
<li><p>module-naming-stack</p></li>
<li><p>importing-stack</p></li>
<li><p>syntax-backup-area</p></li>
<li><p>syntax-stack</p><p>and syntax-rule-set in it</p></li></ul>
</div>
</div>

<div id="outline-container-org1966a6c" class="outline-3">
<h3 id="org1966a6c"><b>undo-stack</b></h3>
<div class="outline-text-3" id="text-org1966a6c">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">60</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">undo-stack:*size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">7</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">undo-stack:*unit*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">undo-stack:*size*</span>
<span style="color: #fd971f; font-weight: bold;">undo-stack:*unit*</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*undo-stack*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*undo-stack*</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">undo-stack:*pointer*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2e293d8" class="outline-3">
<h3 id="org2e293d8"><span class="todo note">note</span> undo-point</h3>
<div class="outline-text-3" id="text-org2e293d8">
<ul class="org-ul">
<li><p><b>undo-stack</b> contain undo-point</p></li>
<li><p><p></p><p>structure</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">undo-point</td></p><p><td class="org-left">jojo-area</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">string-area</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">global-naming-stack</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">module-naming-stack</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">syntax-backup-area</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">number of syntax-rule-sets</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">importing-stack</td></p><p></tr></p><p></tbody></p><p></table></p></li>
<li><p>the undo-point used to undo</p><p>will be used to reset the pointer of undo-stack</p><p>[the current-free-address of undo-stack]</p></li></ul>
</div>
</div>

<div id="outline-container-org74c7943" class="outline-3">
<h3 id="org74c7943">interface of &lt;undo-point&gt;</h3>
<div class="outline-text-3" id="text-org74c7943">
</div><div id="outline-container-orgd9af82" class="outline-4">
<h4 id="orgd9af82">undo-point:[get|set]-jojo-area</h4>
<div class="outline-text-4" id="text-orgd9af82">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:get-jojo-area</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- jojo-area current-free-address &gt;&gt;</span>
  get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:set-jojo-area</span>
  <span style="color: #FF8888;">&lt;&lt; jojo-area current-free-address, undo-point -- &gt;&gt;</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org629b7db" class="outline-4">
<h4 id="org629b7db">undo-point:[get|set]-string-area</h4>
<div class="outline-text-4" id="text-org629b7db">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:get-string-area</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- jojo-area current-free-address &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:set-string-area</span>
  <span style="color: #FF8888;">&lt;&lt; jojo-area current-free-address, undo-point -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org101e1af" class="outline-4">
<h4 id="org101e1af">undo-point:[get|set]-global-naming-stack</h4>
<div class="outline-text-4" id="text-org101e1af">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:get-global-naming-stack</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- jojo-area current-free-address &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:set-global-naming-stack</span>
  <span style="color: #FF8888;">&lt;&lt; jojo-area current-free-address, undo-point -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org9f10d93" class="outline-4">
<h4 id="org9f10d93">undo-point:[get|set]-module-naming-stack</h4>
<div class="outline-text-4" id="text-org9f10d93">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:get-module-naming-stack</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- jojo-area current-free-address &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">3</span> mul add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:set-module-naming-stack</span>
  <span style="color: #FF8888;">&lt;&lt; jojo-area current-free-address, undo-point -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">3</span> mul add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org1242cfa" class="outline-4">
<h4 id="org1242cfa">undo-point:[get|set]-syntax-backup-area</h4>
<div class="outline-text-4" id="text-org1242cfa">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:get-syntax-backup-area</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- jojo-area current-free-address &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> mul add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:set-syntax-backup-area</span>
  <span style="color: #FF8888;">&lt;&lt; jojo-area current-free-address, undo-point -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">4</span> mul add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org94ed01c" class="outline-4">
<h4 id="org94ed01c">undo-point:[get|set]-number-of-syntax-rule-sets</h4>
<div class="outline-text-4" id="text-org94ed01c">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:get-number-of-syntax-rule-sets</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- jojo-area current-free-address &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">5</span> mul add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:set-number-of-syntax-rule-sets</span>
  <span style="color: #FF8888;">&lt;&lt; jojo-area current-free-address, undo-point -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">5</span> mul add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org3986d33" class="outline-4">
<h4 id="org3986d33">undo-point:[get|set]-importing-stack</h4>
<div class="outline-text-4" id="text-org3986d33">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:get-importing-stack</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- jojo-area current-free-address &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">6</span> mul add get
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:set-importing-stack</span>
  <span style="color: #FF8888;">&lt;&lt; jojo-area current-free-address, undo-point -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">6</span> mul add set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgfb8555" class="outline-3">
<h3 id="orgfb8555"><b>syntax-backup-area</b></h3>
<div class="outline-text-3" id="text-orgfb8555">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">20</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
<span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,size*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,size*</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">*syntax-backup-area*</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,current-free-address*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org80b8c21" class="outline-3">
<h3 id="org80b8c21">undo-point:create</h3>
<div class="outline-text-3" id="text-org80b8c21">
</div><div id="outline-container-orgc8387ee" class="outline-4">
<h4 id="orgc8387ee"><span class="todo _">記</span> </h4>
<div class="outline-text-4" id="text-orgc8387ee">
<ul class="org-ul">
<li><p>將 undo-point 這個數據結構入 undo-stack</p><p>並返回剛入棧的數據結構的地址</p></li></ul>
</div>
</div>

<div id="outline-container-org5a3c6bf" class="outline-4">
<h4 id="org5a3c6bf">undo-point:create,copy-syntax,one-syntax-rule-set</h4>
<div class="outline-text-4" id="text-org5a3c6bf">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:create,copy-syntax,one-syntax-rule-set</span>
  <span style="color: #FF8888;">&lt;&lt; syntax-rule-set -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syntax-rule-set</span>
  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>get-border <span style="color: #FF4C4C; font-weight: bold;">&gt;:border</span>
  <span style="color: #83EA83; font-weight: bold;">:border</span> <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span> sub
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div <span style="color: #FF4C4C; font-weight: bold;">&gt;:n</span>

  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span>
  <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,current-free-address*</span> set
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,current-free-address*</span> add-set

  <span style="color: #83EA83; font-weight: bold;">:n</span>
  <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,current-free-address*</span> set
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,current-free-address*</span> add-set

  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span>
  <span style="color: #83EA83; font-weight: bold;">:n</span> n-get
  <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,current-free-address*</span>
  <span style="color: #83EA83; font-weight: bold;">:n</span> n-set
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #83EA83; font-weight: bold;">:n</span> mul
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,current-free-address*</span> add-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc7c0cce" class="outline-4">
<h4 id="orgc7c0cce">undo-point:create,copy-syntax</h4>
<div class="outline-text-4" id="text-orgc7c0cce">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:create,copy-syntax</span>
  <span style="color: #FF8888;">&lt;&lt; cursor -- &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">syntax-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup get <span style="color: #ffffff; font-weight: bold;">undo-point:</span>create,copy-syntax,one-syntax-rule-set
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org71e79be" class="outline-4">
<h4 id="org71e79be">undo-point:create</h4>
<div class="outline-text-4" id="text-org71e79be">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:create</span>
  <span style="color: #FF8888;">&lt;&lt; -- undo-point &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">undo-stack:*pointer*</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:undo-point</span>

  <span style="color: #fd971f; font-weight: bold;">undo-stack:*unit*</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">undo-stack:*pointer*</span>
  add-set

  <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>set-jojo-area

  <span style="color: #fd971f; font-weight: bold;">*string-area,current-free-address*</span>
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>set-string-area

  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span>
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>set-global-naming-stack

  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span>
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>set-module-naming-stack

  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>set-importing-stack

  <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,current-free-address*</span>
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>set-syntax-backup-area

  <span style="color: #fd971f; font-weight: bold;">syntax-stack:*address*</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>create,copy-syntax

  <span style="color: #fd971f; font-weight: bold;">syntax-stack:*pointer*</span>
  <span style="color: #fd971f; font-weight: bold;">syntax-stack:*address*</span> sub
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>set-number-of-syntax-rule-sets

  <span style="color: #83EA83; font-weight: bold;">:undo-point</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgbe48b1f" class="outline-3">
<h3 id="orgbe48b1f">undo-point:restore</h3>
<div class="outline-text-3" id="text-orgbe48b1f">
</div><div id="outline-container-org813bc8" class="outline-4">
<h4 id="org813bc8">undo-point:restore-jojo-area</h4>
<div class="outline-text-4" id="text-org813bc8">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:restore-jojo-area</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- &gt;&gt;</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>get-jojo-area
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5a57edb" class="outline-4">
<h4 id="org5a57edb">undo-point:restore-string-area</h4>
<div class="outline-text-4" id="text-org5a57edb">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:restore-string-area</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- &gt;&gt;</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>get-string-area
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*string-area,current-free-address*</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2570a7" class="outline-4">
<h4 id="org2570a7">undo-point:restore-global-naming-stack</h4>
<div class="outline-text-4" id="text-org2570a7">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:restore-global-naming-stack</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- &gt;&gt;</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>get-global-naming-stack <span style="color: #FF4C4C; font-weight: bold;">&gt;:old-record</span>

  <span style="color: #83EA83; font-weight: bold;">:old-record</span>
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>clear-naming

  <span style="color: #83EA83; font-weight: bold;">:old-record</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org85a10e4" class="outline-4">
<h4 id="org85a10e4">undo-point:restore-module-naming-stack</h4>
<div class="outline-text-4" id="text-org85a10e4">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:restore-module-naming-stack</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- &gt;&gt;</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>get-module-naming-stack <span style="color: #FF4C4C; font-weight: bold;">&gt;:old-record</span>

  <span style="color: #83EA83; font-weight: bold;">:old-record</span>
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-naming-stack:</span>clear-naming

  <span style="color: #83EA83; font-weight: bold;">:old-record</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org71c3886" class="outline-4">
<h4 id="org71c3886"><span class="todo _">記</span> 語法棧的備份</h4>
<div class="outline-text-4" id="text-org71c3886">
<ul class="org-ul">
<li><p>複製出去的時候 從頭到尾[從棧底到棧頂]掃描 語法棧</p><p>複製回來的時候 從頭到尾掃描 語法備份區</p></li>
<li><p><p></p><p>規則集 本身做爲數據結構的存在是</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></p><p><col  class="org-left" /></p><p></colgroup></p><p><thead></p><p><tr></p><p><th scope="col" class="org-left">&#xa0;</th></p><p><th scope="col" class="org-left">border</th></p><p></tr></p><p></thead></p><p><tbody></p><p><tr></p><p><td class="org-left">syntax-rule-set</td></p><p><td class="org-left">predicate</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">function</td></p><p></tr></p><p></tbody></p><p><tbody></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">predicate</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">function</td></p><p></tr></p><p></tbody></p><p><tbody></p><p><tr></p><p><td class="org-left">&#xa0;</td></p><p><td class="org-left">&#x2026;</td></p><p></tr></p><p></tbody></p><p></table></p></li>
<li><p><p></p><p>語法棧中的每一個 規則集 在備份中的存在是</p><p></p></p><p><table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"></p><p></p><p></p><p><colgroup></p><p><col  class="org-left" /></p><p></colgroup></p><p><tbody></p><p><tr></p><p><td class="org-left">address</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">length</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">jo</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">jo</td></p><p></tr></p><p></p><p><tr></p><p><td class="org-left">&#x2026;</td></p><p></tr></p><p></tbody></p><p></table></p><p><p></p><p>此處把 jo 按順序複製回 address 所代表的 規則集</p><p>然後重置 current-free-address 就行了</p><p>並不必知道 jo 的語義</p><p></p></p></li></ul>
</div>
</div>

<div id="outline-container-org64f78ec" class="outline-4">
<h4 id="org64f78ec">undo-point:restore-syntax-backup-area,set-syntax</h4>
<div class="outline-text-4" id="text-org64f78ec">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:restore-syntax-backup-area,set-syntax</span>
  <span style="color: #FF8888;">&lt;&lt; cursor, syntax-rule-set-copy, number-of-syntax-rule-sets -- cursor &gt;&gt;</span>
  dup <span style="color: #ffffff; font-weight: bold;">zero?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:number-of-syntax-rule-sets</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:syntax-rule-set-copy</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set-copy</span> get <span style="color: #FF4C4C; font-weight: bold;">&gt;:syntax-rule-set</span>
  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set-copy</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add get <span style="color: #FF4C4C; font-weight: bold;">&gt;:n</span>

  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span> <span style="color: #83EA83; font-weight: bold;">:cursor</span> set

  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set-copy</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">2</span> mul add
  <span style="color: #83EA83; font-weight: bold;">:n</span> n-get
  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span>
  <span style="color: #83EA83; font-weight: bold;">:n</span> n-set

  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span>
  <span style="color: #83EA83; font-weight: bold;">:n</span> mul
  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span> add
  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>set-border

  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> add
  <span style="color: #83EA83; font-weight: bold;">:syntax-rule-set-copy</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #83EA83; font-weight: bold;">:n</span> <span style="color: #fd971f; font-weight: bold;">2</span> add mul add
  <span style="color: #83EA83; font-weight: bold;">:number-of-syntax-rule-sets</span> sub1
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org57205d7" class="outline-4">
<h4 id="org57205d7">undo-point:restore-syntax-backup-area</h4>
<div class="outline-text-4" id="text-org57205d7">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:restore-syntax-backup-area</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:undo-point</span>
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span> <span style="color: #ffffff; font-weight: bold;">undo-point:</span>get-syntax-backup-area <span style="color: #FF4C4C; font-weight: bold;">&gt;:old-address</span>
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span> <span style="color: #ffffff; font-weight: bold;">undo-point:</span>get-number-of-syntax-rule-sets <span style="color: #FF4C4C; font-weight: bold;">&gt;:number-of-syntax-rule-sets</span>

  <span style="color: #fd971f; font-weight: bold;">syntax-stack:*address*</span>
  <span style="color: #83EA83; font-weight: bold;">:old-address</span>
  <span style="color: #83EA83; font-weight: bold;">:number-of-syntax-rule-sets</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>restore-syntax-backup-area,set-syntax <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>

  <span style="color: #83EA83; font-weight: bold;">:cursor</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">syntax-stack:*pointer*</span>
  set

  <span style="color: #83EA83; font-weight: bold;">:old-address</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">*syntax-backup-area,current-free-address*</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org87b7676" class="outline-4">
<h4 id="org87b7676">undo-point:restore-importing-stack</h4>
<div class="outline-text-4" id="text-org87b7676">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:restore-importing-stack</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- &gt;&gt;</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>get-importing-stack
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org7b3bc23" class="outline-4">
<h4 id="org7b3bc23">undo-point:restore-undo-stack</h4>
<div class="outline-text-4" id="text-org7b3bc23">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo-point:restore-undo-stack</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">undo-stack:*pointer*</span>
  set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgb01cb63" class="outline-3">
<h3 id="orgb01cb63">undo</h3>
<div class="outline-text-3" id="text-orgb01cb63">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">undo</span>
  <span style="color: #FF8888;">&lt;&lt; undo-point -- &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:undo-point</span>
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span> <span style="color: #ffffff; font-weight: bold;">undo-point:</span>restore-jojo-area
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span> <span style="color: #ffffff; font-weight: bold;">undo-point:</span>restore-string-area
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span> <span style="color: #ffffff; font-weight: bold;">undo-point:</span>restore-global-naming-stack
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span> <span style="color: #ffffff; font-weight: bold;">undo-point:</span>restore-module-naming-stack
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span> <span style="color: #ffffff; font-weight: bold;">undo-point:</span>restore-syntax-backup-area
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span> <span style="color: #ffffff; font-weight: bold;">undo-point:</span>restore-importing-stack
  <span style="color: #83EA83; font-weight: bold;">:undo-point</span> <span style="color: #ffffff; font-weight: bold;">undo-point:</span>restore-undo-stack
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org90369ff" class="outline-3">
<h3 id="org90369ff"><span class="done test">test</span> undo</h3>
<div class="outline-text-3" id="text-org90369ff">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffffff; font-weight: bold;">undo-point:</span>create
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*undo-point*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,undo</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"testing undo"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

test,undo <span style="color: #FF8888;">&lt;&lt; testing undo &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*undo-point*</span> undo

test,undo <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*undo-point*</span> <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>


<span style="color: #FF8888;">&lt;&lt; with global-naming-stack &gt;&gt;</span>

<span style="color: #ffffff; font-weight: bold;">undo-point:</span>create
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*undo-point*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,undo</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"before undo"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

test,undo <span style="color: #FF8888;">&lt;&lt; before undo &gt;&gt;</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,undo</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"after undo"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

test,undo <span style="color: #FF8888;">&lt;&lt; after undo &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*undo-point*</span> undo

test,undo <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*undo-point*</span> <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgc72b573" class="outline-3">
<h3 id="orgc72b573"><span class="done test">test</span> undo with syntax-stack</h3>
<div class="outline-text-3" id="text-orgc72b573">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffffff; font-weight: bold;">undo-point:</span>create
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*undo-point*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">integer-string?</span>
<span style="color: #f92672; font-weight: bold;">jo</span> hi
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> push-syntax-stack

<span style="color: #fd971f; font-weight: bold;">123</span> drop2 <span style="color: #FF8888;">&lt;&lt; hi &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">syntax-stack:*pointer*</span>
<span style="color: #fd971f; font-weight: bold;">syntax-stack:*address*</span> sub
<span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div . <span style="color: #FF8888;">&lt;&lt; 2 &gt;&gt;</span>

<span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">report:syntax</span>
<span style="color: #FF8888;">&gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*undo-point*</span> undo

<span style="color: #fd971f; font-weight: bold;">123</span> . <span style="color: #FF8888;">&lt;&lt; 123 &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">syntax-stack:*pointer*</span>
<span style="color: #fd971f; font-weight: bold;">syntax-stack:*address*</span> sub
<span style="color: #fd971f; font-weight: bold;">*cell-size*</span> div . <span style="color: #FF8888;">&lt;&lt; 1 &gt;&gt;</span>

<span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">report:syntax</span>
<span style="color: #FF8888;">&gt;&gt;</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb0acceb" class="outline-3">
<h3 id="orgb0acceb"><span class="done test">test</span> undo with alias</h3>
<div class="outline-text-3" id="text-orgb0acceb">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffffff; font-weight: bold;">undo-point:</span>create
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*undo-point*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,undo</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"testing undo"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #e6db74;">"t,u"</span> <span style="color: #e6db74;">"test,undo"</span> alias

test,undo <span style="color: #FF8888;">&lt;&lt; testing undo &gt;&gt;</span>
t,u <span style="color: #FF8888;">&lt;&lt; testing undo &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*undo-point*</span> undo

test,undo <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>
t,u <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*undo-point*</span> <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>


<span style="color: #FF8888;">&lt;&lt; with global-naming-stack &gt;&gt;</span>

<span style="color: #ffffff; font-weight: bold;">undo-point:</span>create
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*undo-point*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,undo</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"before undo"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #e6db74;">"t,u"</span> <span style="color: #e6db74;">"test,undo"</span> alias

test,undo <span style="color: #FF8888;">&lt;&lt; before undo &gt;&gt;</span>
t,u  <span style="color: #FF8888;">&lt;&lt; before undo &gt;&gt;</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test,undo</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"after undo"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

test,undo <span style="color: #FF8888;">&lt;&lt; after undo &gt;&gt;</span>

t,u  <span style="color: #FF8888;">&lt;&lt; before undo &gt;&gt;</span>

<span style="color: #e6db74;">"t,u"</span> <span style="color: #e6db74;">"test,undo"</span> alias

t,u  <span style="color: #FF8888;">&lt;&lt; after undo &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*undo-point*</span> undo


test,undo <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>
t,u  <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*undo-point*</span> <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org91c871" class="outline-2">
<h2 id="org91c871">pre-module:*syntax-rule-set*</h2>
<div class="outline-text-2" id="text-org91c871">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set:size*</span>
  <span style="color: #fd971f; font-weight: bold;">1024</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>

<span style="color: #FF8888;">&lt;&lt; for cursor &gt;&gt;</span>
<span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span> drop

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span>
  <span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set:size*</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>

<span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span>
<span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> sub
set
</pre>
</div>
</div>
</div>

<div id="outline-container-orgdff477c" class="outline-2">
<h2 id="orgdff477c">syntax-rule-set:*post-module*</h2>
<div class="outline-text-2" id="text-orgdff477c">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">post-module:*syntax-rule-set:size*</span>
  <span style="color: #fd971f; font-weight: bold;">1024</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> mul
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>

<span style="color: #FF8888;">&lt;&lt; for cursor &gt;&gt;</span>
<span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span> drop

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span>
  <span style="color: #fd971f; font-weight: bold;">post-module:*syntax-rule-set:size*</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-memory</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span>
<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span> <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> sub
set
</pre>
</div>
</div>
</div>

<div id="outline-container-org1ec4770" class="outline-2">
<h2 id="org1ec4770">module-buffer</h2>
<div class="outline-text-2" id="text-org1ec4770">
</div><div id="outline-container-org41d1f98" class="outline-3">
<h3 id="org41d1f98">module-meta-begin-word?</h3>
<div class="outline-text-3" id="text-org41d1f98">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-meta-begin-word?</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- bool &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">6</span> <span style="color: #ffffff; font-weight: bold;">less-than?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">":"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #ffffff; font-weight: bold;">string:</span>full-of-the-same-byte?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4af681f" class="outline-3">
<h3 id="org4af681f">module-meta-end-word?</h3>
<div class="outline-text-3" id="text-org4af681f">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-meta-end-word?</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- bool &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">6</span> <span style="color: #ffffff; font-weight: bold;">less-than?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #e6db74;">"="</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte
  <span style="color: #ffffff; font-weight: bold;">string:</span>full-of-the-same-byte?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orga9c46c1" class="outline-3">
<h3 id="orga9c46c1">module-meta-word?</h3>
<div class="outline-text-3" id="text-orga9c46c1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-meta-word?</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- bool &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">module-meta-begin-word?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">module-meta-end-word?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">true</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">less-or-equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span> add sub1 get-byte <span style="color: #FF4C4C; font-weight: bold;">&gt;:last-byte</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span> <span style="color: #83EA83; font-weight: bold;">:length</span> add sub1 sub1 get-byte <span style="color: #FF4C4C; font-weight: bold;">&gt;:the-byte-before-last-byte</span>
  <span style="color: #83EA83; font-weight: bold;">:last-byte</span>
  <span style="color: #e6db74;">":"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">equal?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:the-byte-before-last-byte</span>
  <span style="color: #e6db74;">":"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>byte <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org55e53c2" class="outline-3">
<h3 id="org55e53c2"><span class="done test">test</span> module-meta-begin-word? &amp; module-meta-begin-word?</h3>
<div class="outline-text-3" id="text-org55e53c2">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) module-meta-begin-word? &amp; module-meta-begin-word?"</span> .s .l
  <span style="color: #e6db74;">"::::::"</span> <span style="color: #ffffff; font-weight: bold;">module-meta-begin-word?</span> <span style="color: #ffffff; font-weight: bold;">true?</span>
  <span style="color: #e6db74;">"======"</span> <span style="color: #ffffff; font-weight: bold;">module-meta-end-word?</span> <span style="color: #ffffff; font-weight: bold;">true?</span> and

  <span style="color: #e6db74;">":::::"</span> <span style="color: #ffffff; font-weight: bold;">module-meta-begin-word?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and
  <span style="color: #e6db74;">"====="</span> <span style="color: #ffffff; font-weight: bold;">module-meta-end-word?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and

  <span style="color: #e6db74;">":::&gt;&lt;:::"</span> <span style="color: #ffffff; font-weight: bold;">module-meta-begin-word?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and
  <span style="color: #e6db74;">"===&gt;&lt;==="</span> <span style="color: #ffffff; font-weight: bold;">module-meta-end-word?</span> <span style="color: #ffffff; font-weight: bold;">false?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org5d143e5" class="outline-3">
<h3 id="org5d143e5"><span class="todo _">記</span> 謂詞</h3>
<div class="outline-text-3" id="text-org5d143e5">
<ul class="org-ul">
<li><p>作用於 module-buffer 的函數</p><p>均假設 module-buffer 格式良好</p><p>在調用它們之前</p><p>應該利用有關謂詞保證其格式良好</p></li>
<li><p>謂詞是針對 module-buffer 的</p><p>[即 針對字符串的]</p><p>而不是針對文件的</p><p>否則就會重複閱讀文件</p></li></ul>
</div>
</div>

<div id="outline-container-org34de985" class="outline-3">
<h3 id="org34de985">module-buffer:good-format?</h3>
<div class="outline-text-3" id="text-org34de985">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-buffer:good-format?</span>
  <span style="color: #FF8888;">&lt;&lt; module-buffer[address, length] -- bool &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>word
  <span style="color: #ffffff; font-weight: bold;">module-meta-begin-word?</span> not <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #fd971f; font-weight: bold;">false</span>
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">module-meta-end-word?</span> <span style="color: #ffffff; font-weight: bold;">string:</span>any-word
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org48221ff" class="outline-3">
<h3 id="org48221ff"><span class="done test">test</span> module-buffer:good-format?</h3>
<div class="outline-text-3" id="text-org48221ff">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) module-buffer:good-format"</span> .s .l
  "
  <span style="color: #ef5939; font-weight: bold;">:::::::::</span>
  <span style="color: #a6e22e; font-weight: bold;">import:</span> combinator math
  <span style="color: #a6e22e; font-weight: bold;">module:</span> assembler
  <span style="color: #ae81ff; font-weight: bold;">=========</span>
  hi
  kkk took my baby away!
  "
  <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>good-format? <span style="color: #ffffff; font-weight: bold;">true?</span>

  "
  <span style="color: #ef5939; font-weight: bold;">:::::::::</span>
  <span style="color: #a6e22e; font-weight: bold;">import:</span> combinator math
  <span style="color: #a6e22e; font-weight: bold;">module:</span> assembler
  hi
  kkk took my baby away!
  "
  <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>good-format? <span style="color: #ffffff; font-weight: bold;">false?</span> and <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org44b0a83" class="outline-3">
<h3 id="org44b0a83">module-buffer:get-code-string</h3>
<div class="outline-text-3" id="text-org44b0a83">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-buffer:get-code-string</span>
  <span style="color: #FF8888;">&lt;&lt; module-buffer[address, length] -- meta-string[address, length] &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>word
  <span style="color: #ffffff; font-weight: bold;">module-meta-end-word?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgafdf496" class="outline-3">
<h3 id="orgafdf496">module-buffer:get-meta-string</h3>
<div class="outline-text-3" id="text-orgafdf496">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-buffer:get-meta-string,loop</span>
  <span style="color: #FF8888;">&lt;&lt; module-buffer[address, length] -- cursor &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>word
  <span style="color: #ffffff; font-weight: bold;">module-meta-end-word?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-buffer:get-meta-string</span>
  <span style="color: #FF8888;">&lt;&lt; module-buffer[address, length] -- meta-string[address, length] &gt;&gt;</span>
  dup2 <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>get-meta-string,loop <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  drop <span style="color: #FF4C4C; font-weight: bold;">&gt;:address</span>
  <span style="color: #83EA83; font-weight: bold;">:address</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #83EA83; font-weight: bold;">:address</span> sub
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org14996ae" class="outline-3">
<h3 id="org14996ae"><span class="done test">test</span> module-buffer:get-meta-string</h3>
<div class="outline-text-3" id="text-org14996ae">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #e6db74;">"* (testing) module-buffer:get-meta-string"</span> .s .l
  "
  <span style="color: #ef5939; font-weight: bold;">:::::::::</span>
  <span style="color: #a6e22e; font-weight: bold;">import:</span> combinator math
  <span style="color: #a6e22e; font-weight: bold;">module:</span> assembler
  <span style="color: #ae81ff; font-weight: bold;">=========</span>
  hi
  kkk took my baby away!
  "
  <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>get-meta-string
  "
  <span style="color: #ef5939; font-weight: bold;">:::::::::</span>
  <span style="color: #a6e22e; font-weight: bold;">import:</span> combinator math
  <span style="color: #a6e22e; font-weight: bold;">module:</span> assembler
  ========="
  <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #1ef15f; font-weight: bold;">test</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #1ef15f; font-weight: bold;">test-do</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgfa46929" class="outline-2">
<h2 id="orgfa46929">import &amp; load &amp; load-with-test</h2>
<div class="outline-text-2" id="text-orgfa46929">
</div><div id="outline-container-orgc872185" class="outline-3">
<h3 id="orgc872185"><span class="todo _">記</span> 避免相互遞歸函數</h3>
<div class="outline-text-3" id="text-orgc872185">
<ul class="org-ul">
<li><p>沒有相互遞歸函數 (load) (import) 不可相互調用</p><p>加載[load] 不是遞歸函數 而待</p><p>引入[import] 是遞歸函數 而覺</p></li>
<li><p><p></p><p>分析一下遞歸函數</p><p>每次分析遞歸函數 就是要知道</p><p></p></p><p><ol class="org-ol"></p><p><li>如何展開 每個遞歸調用就是展開</p><p>展開就是</p><p>返回棧增加一珠珠</p><p>分配內存給局部數據</li></p><p><li>如何收回 每次函數退出就是收回</li></p><p><li>比如</p><p>pre-function</p><p>recur</p><p>post-function</p><p>end</p><p>其中 pre-function 是展開過程中調用的函數 調用它們的順序是 珠珠 入棧的順序</p><p>而 post-function 是收回過程中調用的函數 調用它們的順序是 珠珠 出棧的順序</p><p>考錄 返回棧 之變化情況就很清楚啦</li></ol></p><p><p></p><p>這次</p><p></p></p><p><ol class="org-ol"></p><p><li>展開</p><p>入 引入棧</li></p><p><li>遞歸</p><p>遞歸發生在 對語法關鍵詞 "import:" 的處理過程中</li></p><p><li>返回</p><p>入 加載棧</p><p>解釋代碼</li></ol></p></li></ul>
</div>
</div>

<div id="outline-container-org4b00194" class="outline-3">
<h3 id="org4b00194">name-&gt;module-prefix</h3>
<div class="outline-text-3" id="text-org4b00194">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">name-&gt;module-prefix</span>
  <span style="color: #FF8888;">&lt;&lt; name -- module-prefix &gt;&gt;</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>

  <span style="color: #fd971f; font-weight: bold;">512</span> <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>

  <span style="color: #e6db74;">"|"</span> <span style="color: #83EA83; font-weight: bold;">:name</span> name<span style="color: #b0b1a3;">-&gt;</span>string <span style="color: #e6db74;">"|"</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">3</span> n-string<span style="color: #b0b1a3;">-&gt;</span>buffer! <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #83EA83; font-weight: bold;">:length</span>
  string<span style="color: #b0b1a3;">-&gt;</span>name
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org72a552c" class="outline-3">
<h3 id="org72a552c">import</h3>
<div class="outline-text-3" id="text-org72a552c">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">import</span>
  <span style="color: #FF8888;">&lt;&lt; module-name-string[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::module-name-string</span>
  <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> string<span style="color: #b0b1a3;">-&gt;</span>name <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-name-index</span>
  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span> name<span style="color: #b0b1a3;">-&gt;</span>module-prefix <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-prefix</span>

  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span> <span style="color: #ffffff; font-weight: bold;">module-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span> <span style="color: #ffffff; font-weight: bold;">importing-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (import) circular import of : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>find not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (import) can not find module : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::module-path</span>

  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
  <span style="color: #5CDD5C; font-weight: bold;">::module-path</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>read <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>good-format? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (import) fail to import module : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #e6db74;">"  for the file is not well formated cicada-nymph source code"</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>get-meta-string <span style="color: #dc322f; font-weight: bold;">&gt;::meta-string</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>get-code-string <span style="color: #dc322f; font-weight: bold;">&gt;::code-string</span>

  <span style="color: #fd971f; font-weight: bold;">false</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-tested-flag

  <span style="color: #fd971f; font-weight: bold;">false</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">importing-record:</span>set-testing-flag
  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">importing-record:</span>set-name
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span> add-set

  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:global-name-record-before-import</span>

  <span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span> push-syntax-stack
  <span style="color: #5CDD5C; font-weight: bold;">::meta-string</span> eval-string
  drop-syntax-stack

  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:global-name-record-begin</span>
  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> push-syntax-stack
  <span style="color: #5CDD5C; font-weight: bold;">::code-string</span> eval-string
  drop-syntax-stack
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:global-name-record-end</span>

  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span> push-syntax-stack
  <span style="color: #5CDD5C; font-weight: bold;">::meta-string</span> eval-string
  drop-syntax-stack

  <span style="color: #ffffff; font-weight: bold;">importing-stack:</span>drop

  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-name-record-begin</span>
  <span style="color: #83EA83; font-weight: bold;">:global-name-record-begin</span>
  <span style="color: #83EA83; font-weight: bold;">:global-name-record-end</span>
  <span style="color: #83EA83; font-weight: bold;">:module-prefix</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>prefix-naming
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-name-record-end</span>

  <span style="color: #83EA83; font-weight: bold;">:global-name-record-before-import</span>
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>clear-naming

  <span style="color: #83EA83; font-weight: bold;">:global-name-record-before-import</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> set

  <span style="color: #83EA83; font-weight: bold;">:module-name-record-begin</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-name-record-begin
  <span style="color: #83EA83; font-weight: bold;">:module-name-record-end</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-name-record-end
  <span style="color: #5CDD5C; font-weight: bold;">::meta-string</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-meta-string
  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-name
  <span style="color: #fd971f; font-weight: bold;">module-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span> add-set
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org472c71f" class="outline-3">
<h3 id="org472c71f">module-syntax:unknow-meta-word</h3>
<div class="outline-text-3" id="text-org472c71f">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-syntax:unknow-meta-word,loop</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  read-word <span style="color: #ffffff; font-weight: bold;">module-meta-word?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    unread-word
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">module-syntax:unknow-meta-word</span>
  <span style="color: #FF8888;">&lt;&lt; meta-word -- &gt;&gt;</span>
  drop2
  <span style="color: #ffffff; font-weight: bold;">module-syntax:</span>unknow-meta-word,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgace5e41" class="outline-3">
<h3 id="orgace5e41">pre-module-syntax</h3>
<div class="outline-text-3" id="text-orgace5e41">
</div><div id="outline-container-orgb346de0" class="outline-4">
<h4 id="orgb346de0">meta-literal-word:import?</h4>
<div class="outline-text-4" id="text-orgb346de0">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">meta-literal-word:import?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  <span style="color: #e6db74;">"import:"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgf89e72" class="outline-4">
<h4 id="orgf89e72">pre-module-syntax:import</h4>
<div class="outline-text-4" id="text-orgf89e72">
<ul class="org-ul">
<li><p>import module and expose-naming</p><p>one by one</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">pre-module-syntax:import,loop</span>
  <span style="color: #FF8888;">&lt;&lt; -- unknow &gt;&gt;</span>
  read-word <span style="color: #dc322f; font-weight: bold;">&gt;::word</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> string<span style="color: #b0b1a3;">-&gt;</span>name <span style="color: #FF4C4C; font-weight: bold;">&gt;:name</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> <span style="color: #ffffff; font-weight: bold;">module-meta-word?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    unread-word
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> <span style="color: #a6e22e; font-weight: bold;">import</span>
  <span style="color: #83EA83; font-weight: bold;">:name</span> <span style="color: #ffffff; font-weight: bold;">module-stack:</span>find not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (pre-module-syntax:import,loop) after import module : "</span> .s
       <span style="color: #83EA83; font-weight: bold;">:name</span> name<span style="color: #b0b1a3;">-&gt;</span>string .s .l
    <span style="color: #e6db74;">"  still can not find it in the module-stack"</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-info</span>
  <span style="color: #83EA83; font-weight: bold;">:module-info</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name-record-begin
  <span style="color: #83EA83; font-weight: bold;">:module-info</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name-record-end
  <span style="color: #ffffff; font-weight: bold;">module-naming-stack:</span>expose-naming
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">pre-module-syntax:import</span>
  <span style="color: #FF8888;">&lt;&lt; meta-literal-word:import -- unknow &gt;&gt;</span>
  drop2
  <span style="color: #ffffff; font-weight: bold;">pre-module-syntax:</span>import,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org4671237" class="outline-4">
<h4 id="org4671237">add syntax-rule</h4>
<div class="outline-text-4" id="text-org4671237">
<ul class="org-ul">
<li><p>the order matters</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span>
<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>mixin

<span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">module-meta-word?</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">module-syntax:</span>unknow-meta-word
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

<span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">module-meta-begin-word?</span>
<span style="color: #f92672; font-weight: bold;">jo</span> drop2
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

<span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">module-meta-end-word?</span>
<span style="color: #f92672; font-weight: bold;">jo</span> drop2
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

<span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">meta-literal-word:</span>import?
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">pre-module-syntax:</span>import
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgd17520e" class="outline-3">
<h3 id="orgd17520e">post-module-syntax</h3>
<div class="outline-text-3" id="text-orgd17520e">
</div><div id="outline-container-org20f43e9" class="outline-4">
<h4 id="org20f43e9">meta-literal-word:do?</h4>
<div class="outline-text-4" id="text-org20f43e9">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">meta-literal-word:do?</span>
  <span style="color: #FF8888;">&lt;&lt; word[address, length] -- bool &gt;&gt;</span>
  <span style="color: #e6db74;">"do:"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal?
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgb09b521" class="outline-4">
<h4 id="orgb09b521">post-module-syntax:do</h4>
<div class="outline-text-4" id="text-orgb09b521">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">post-module-syntax:do,loop</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  read-word <span style="color: #dc322f; font-weight: bold;">&gt;::word</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> <span style="color: #ffffff; font-weight: bold;">module-meta-word?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    unread-word
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::word</span> word-interpreter
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">post-module-syntax:do</span>
  <span style="color: #FF8888;">&lt;&lt; meta-literal-word:do -- &gt;&gt;</span>
  drop2
  <span style="color: #ffffff; font-weight: bold;">post-module-syntax:</span>do,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgaf49fd3" class="outline-4">
<h4 id="orgaf49fd3">add syntax-rule</h4>
<div class="outline-text-4" id="text-orgaf49fd3">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span>
<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span>
<span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>mixin

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">module-meta-word?</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">module-syntax:</span>unknow-meta-word
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">module-meta-begin-word?</span>
<span style="color: #f92672; font-weight: bold;">jo</span> drop2
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">module-meta-end-word?</span>
<span style="color: #f92672; font-weight: bold;">jo</span> drop2
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add

<span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span>
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">meta-literal-word:</span>do?
<span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">post-module-syntax:</span>do
<span style="color: #ffffff; font-weight: bold;">syntax-rule:</span>add
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org939aad5" class="outline-3">
<h3 id="org939aad5"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org939aad5">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #FF8888;">&lt;&lt; in system shell</span>
<span style="color: #FF8888;">cn moi add hi module/hi.cn</span>
<span style="color: #FF8888;">cn moi add hihi module/hihi.cn</span>
<span style="color: #FF8888;">&gt;&gt;</span>

<span style="color: #e6db74;">"hihi"</span> <span style="color: #a6e22e; font-weight: bold;">import</span>

hihi <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*test-module-info*</span>
  <span style="color: #f92672; font-weight: bold;">name</span> hihi <span style="color: #ffffff; font-weight: bold;">module-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* can not found hihi"</span> .s .l
  <span style="color: #f92672; font-weight: bold;">then</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>

<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-meta-string .s .l
<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name name<span style="color: #b0b1a3;">-&gt;</span>string .s .l

hihi <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name-record-begin
<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name-record-end
<span style="color: #ffffff; font-weight: bold;">module-naming-stack:</span>expose-naming

hihi
</pre>
</div>
</div>
</div>

<div id="outline-container-org56cd4b1" class="outline-3">
<h3 id="org56cd4b1">load</h3>
<div class="outline-text-3" id="text-org56cd4b1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">load</span>
  <span style="color: #FF8888;">&lt;&lt; module-name-string[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::module-name-string</span>

  <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>create
  <span style="color: #fd971f; font-weight: bold;">reading-stack:*pointer*</span>
  <span style="color: #FF8888;">&lt;&lt; module-name-string[address, length],</span>
<span style="color: #FF8888;">     undo-point</span>
<span style="color: #FF8888;">     reading-stack:*pointer*</span>
<span style="color: #FF8888;">     -- &gt;&gt;</span>

  <span style="color: #93a8c6;">[</span> action,reset-the-stack
    <span style="color: #FF8888;">&lt;&lt; module-name-string[address, length],</span>
<span style="color: #FF8888;">       undo-point</span>
<span style="color: #FF8888;">       reading-stack:*pointer*</span>
<span style="color: #FF8888;">       -- &gt;&gt;</span>
    <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">reading-stack:*pointer*</span> set
    undo
    <span style="color: #e6db74;">"* (load) can not load : "</span> .s .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #93a8c6;">]</span>
  <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #1ef15f; font-weight: bold;">await</span>

  <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> string<span style="color: #b0b1a3;">-&gt;</span>name <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-name-index</span>
  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span> name<span style="color: #b0b1a3;">-&gt;</span>module-prefix <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-prefix</span>

  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span> <span style="color: #ffffff; font-weight: bold;">module-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #e6db74;">"* (load) the following module is already loaded : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span> <span style="color: #ffffff; font-weight: bold;">importing-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (load) circular import of : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>find not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (load) can not find module : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::module-path</span>

  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
  <span style="color: #5CDD5C; font-weight: bold;">::module-path</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>read <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>good-format? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (load) fail to import module : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #e6db74;">"  for the file is not well formated cicada-nymph source code"</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>get-meta-string <span style="color: #dc322f; font-weight: bold;">&gt;::meta-string</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>get-code-string <span style="color: #dc322f; font-weight: bold;">&gt;::code-string</span>

  <span style="color: #fd971f; font-weight: bold;">false</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-tested-flag

  <span style="color: #fd971f; font-weight: bold;">false</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">importing-record:</span>set-testing-flag
  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">importing-record:</span>set-name
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span> add-set

  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:global-name-record-before-import</span>

  <span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span> push-syntax-stack
  <span style="color: #5CDD5C; font-weight: bold;">::meta-string</span> eval-string
  drop-syntax-stack

  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:global-name-record-begin</span>
  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> push-syntax-stack
  <span style="color: #5CDD5C; font-weight: bold;">::code-string</span> eval-string
  drop-syntax-stack
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:global-name-record-end</span>

  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span> push-syntax-stack
  <span style="color: #5CDD5C; font-weight: bold;">::meta-string</span> eval-string
  drop-syntax-stack

  <span style="color: #ffffff; font-weight: bold;">importing-stack:</span>drop

  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-name-record-begin</span>
  <span style="color: #83EA83; font-weight: bold;">:global-name-record-begin</span>
  <span style="color: #83EA83; font-weight: bold;">:global-name-record-end</span>
  <span style="color: #83EA83; font-weight: bold;">:module-prefix</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>prefix-naming
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-name-record-end</span>

  <span style="color: #83EA83; font-weight: bold;">:global-name-record-before-import</span>
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>clear-naming

  <span style="color: #83EA83; font-weight: bold;">:global-name-record-before-import</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> set

  <span style="color: #83EA83; font-weight: bold;">:module-name-record-begin</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-name-record-begin
  <span style="color: #83EA83; font-weight: bold;">:module-name-record-end</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-name-record-end
  <span style="color: #5CDD5C; font-weight: bold;">::meta-string</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-meta-string
  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-name
  <span style="color: #fd971f; font-weight: bold;">module-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span> add-set


  drop
  drop
  drop2
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgbd8e17e" class="outline-3">
<h3 id="orgbd8e17e"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-orgbd8e17e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #FF8888;">&lt;&lt; in system shell</span>
<span style="color: #FF8888;">cn moi add hi module/hi.cn</span>
<span style="color: #FF8888;">cn moi add hihi module/hihi.cn</span>
<span style="color: #FF8888;">&gt;&gt;</span>

<span style="color: #e6db74;">"hihi"</span> <span style="color: #a6e22e; font-weight: bold;">load</span>

hihi <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*test-module-info*</span>
  <span style="color: #f92672; font-weight: bold;">name</span> hihi <span style="color: #ffffff; font-weight: bold;">module-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* can not found hihi"</span> .s .l
  <span style="color: #f92672; font-weight: bold;">then</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>

<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-meta-string .s .l
<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name name<span style="color: #b0b1a3;">-&gt;</span>string .s .l

hihi <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name-record-begin
<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name-record-end
<span style="color: #ffffff; font-weight: bold;">module-naming-stack:</span>expose-naming

hihi


<span style="color: #ffffff; font-weight: bold;">report:</span>memory

<span style="color: #e6db74;">"no"</span> <span style="color: #a6e22e; font-weight: bold;">load</span>
<span style="color: #e6db74;">"hihi"</span> <span style="color: #a6e22e; font-weight: bold;">load</span>

<span style="color: #ffffff; font-weight: bold;">report:</span>memory
</pre>
</div>
</div>
</div>

<div id="outline-container-orga5e52e7" class="outline-3">
<h3 id="orga5e52e7">load-with-test</h3>
<div class="outline-text-3" id="text-orga5e52e7">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">load-with-test</span>
  <span style="color: #FF8888;">&lt;&lt; module-name-string[address, length] -- &gt;&gt;</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::module-name-string</span>

  <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span>
  <span style="color: #ffffff; font-weight: bold;">undo-point:</span>create
  <span style="color: #fd971f; font-weight: bold;">reading-stack:*pointer*</span>
  <span style="color: #FF8888;">&lt;&lt; module-name-string[address, length],</span>
<span style="color: #FF8888;">     undo-point</span>
<span style="color: #FF8888;">     reading-stack:*pointer*</span>
<span style="color: #FF8888;">     -- &gt;&gt;</span>

  <span style="color: #93a8c6;">[</span> action,reset-the-stack
    <span style="color: #FF8888;">&lt;&lt; module-name-string[address, length],</span>
<span style="color: #FF8888;">       undo-point</span>
<span style="color: #FF8888;">       reading-stack:*pointer*</span>
<span style="color: #FF8888;">       -- &gt;&gt;</span>
    <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">reading-stack:*pointer*</span> set
    undo
    <span style="color: #e6db74;">"* (load-with-test) can not load : "</span> .s .s .l
    <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #93a8c6;">]</span>
  <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #1ef15f; font-weight: bold;">await</span>

  <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> string<span style="color: #b0b1a3;">-&gt;</span>name <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-name-index</span>
  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span> name<span style="color: #b0b1a3;">-&gt;</span>module-prefix <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-prefix</span>

  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span> <span style="color: #ffffff; font-weight: bold;">module-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    <span style="color: #e6db74;">"* (load-with-test) the following module is already loaded : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span> <span style="color: #ffffff; font-weight: bold;">importing-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (load-with-test) circular import of : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> <span style="color: #ffffff; font-weight: bold;">moi:</span>find not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (load-with-test) can not find module : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #dc322f; font-weight: bold;">&gt;::module-path</span>

  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul <span style="color: #AE7C3B; font-weight: bold;">allocate-local-memory</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:buffer</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span>
  <span style="color: #fd971f; font-weight: bold;">64</span> <span style="color: #fd971f; font-weight: bold;">1024</span> mul
  <span style="color: #5CDD5C; font-weight: bold;">::module-path</span>
  <span style="color: #ffffff; font-weight: bold;">file:</span>read <span style="color: #FF4C4C; font-weight: bold;">&gt;:length</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>good-format? not <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (load-with-test) fail to import module : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
    <span style="color: #e6db74;">"  for the file is not well formated cicada-nymph source code"</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">'fail-to-load</span> <span style="color: #00ffff; font-weight: bold;">awake</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>get-meta-string <span style="color: #dc322f; font-weight: bold;">&gt;::meta-string</span>
  <span style="color: #83EA83; font-weight: bold;">:buffer</span> <span style="color: #83EA83; font-weight: bold;">:length</span> <span style="color: #ffffff; font-weight: bold;">module-buffer:</span>get-code-string <span style="color: #dc322f; font-weight: bold;">&gt;::code-string</span>

  <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-tested-flag
  <span style="color: #fd971f; font-weight: bold;">0</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-success-counter
  <span style="color: #fd971f; font-weight: bold;">0</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-fail-counter

  <span style="color: #fd971f; font-weight: bold;">true</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">importing-record:</span>set-testing-flag
  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">importing-record:</span>set-name
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span> add-set

  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:global-name-record-before-import</span>

  <span style="color: #fd971f; font-weight: bold;">pre-module:*syntax-rule-set*</span> push-syntax-stack
  <span style="color: #5CDD5C; font-weight: bold;">::meta-string</span> eval-string
  drop-syntax-stack

  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:global-name-record-begin</span>
  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> push-syntax-stack
  <span style="color: #5CDD5C; font-weight: bold;">::code-string</span> eval-string
  drop-syntax-stack
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:global-name-record-end</span>

  <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*post-module*</span> push-syntax-stack
  <span style="color: #5CDD5C; font-weight: bold;">::meta-string</span> eval-string
  drop-syntax-stack

  <span style="color: #ffffff; font-weight: bold;">importing-stack:</span>drop

  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-name-record-begin</span>
  <span style="color: #83EA83; font-weight: bold;">:global-name-record-begin</span>
  <span style="color: #83EA83; font-weight: bold;">:global-name-record-end</span>
  <span style="color: #83EA83; font-weight: bold;">:module-prefix</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>prefix-naming
  <span style="color: #fd971f; font-weight: bold;">module-naming-stack:*pointer*</span> <span style="color: #FF4C4C; font-weight: bold;">&gt;:module-name-record-end</span>

  <span style="color: #83EA83; font-weight: bold;">:global-name-record-before-import</span>
  <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>clear-naming

  <span style="color: #83EA83; font-weight: bold;">:global-name-record-before-import</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> set

  <span style="color: #83EA83; font-weight: bold;">:module-name-record-begin</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-name-record-begin
  <span style="color: #83EA83; font-weight: bold;">:module-name-record-end</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-name-record-end
  <span style="color: #5CDD5C; font-weight: bold;">::meta-string</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-meta-string
  <span style="color: #83EA83; font-weight: bold;">:module-name-index</span>
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span>
  <span style="color: #ffffff; font-weight: bold;">module-info:</span>set-name

  <span style="color: #e6db74;">"* (load-with-test) load : "</span> .s <span style="color: #5CDD5C; font-weight: bold;">::module-name-string</span> .s .l
  <span style="color: #e6db74;">"  success : "</span> .s
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-success-counter
  .i .l
  <span style="color: #e6db74;">"  fali : "</span> .s
  <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-fail-counter
  .i .l

  <span style="color: #fd971f; font-weight: bold;">module-stack:*unit*</span> <span style="color: #f92672; font-weight: bold;">address</span> <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span> add-set


  drop
  drop
  drop2
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2bd074e" class="outline-3">
<h3 id="org2bd074e"><span class="done test">test</span> -function</h3>
<div class="outline-text-3" id="text-org2bd074e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test-function</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span> sub
  <span style="color: #ffffff; font-weight: bold;">importing-record:</span>get-testing-flag <span style="color: #f92672; font-weight: bold;">if</span>
    define-function
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop2
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org769c6e2" class="outline-3">
<h3 id="org769c6e2"><span class="done test">test</span> -variable</h3>
<div class="outline-text-3" id="text-org769c6e2">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test-variable</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span> sub
  <span style="color: #ffffff; font-weight: bold;">importing-record:</span>get-testing-flag <span style="color: #f92672; font-weight: bold;">if</span>
    define-variable
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop2
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org24e2666" class="outline-3">
<h3 id="org24e2666"><span class="done test">test</span> -variable,with-tos</h3>
<div class="outline-text-3" id="text-org24e2666">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test-variable,with-tos</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span> sub
  <span style="color: #ffffff; font-weight: bold;">importing-record:</span>get-testing-flag <span style="color: #f92672; font-weight: bold;">if</span>
    define-variable,with-tos
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop2
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org38ef38e" class="outline-3">
<h3 id="org38ef38e"><span class="done test">test</span> -do</h3>
<div class="outline-text-3" id="text-org38ef38e">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test-do</span>
  <span style="color: #FF8888;">&lt;&lt; string[address, length] -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*pointer*</span>
  <span style="color: #fd971f; font-weight: bold;">importing-stack:*unit*</span> sub
  <span style="color: #ffffff; font-weight: bold;">importing-record:</span>get-testing-flag <span style="color: #f92672; font-weight: bold;">if</span>
    eval-string
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  drop2
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org261c405" class="outline-3">
<h3 id="org261c405">the function test</h3>
<div class="outline-text-3" id="text-org261c405">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">test</span>
  <span style="color: #FF8888;">&lt;&lt; bool -- &gt;&gt;</span>
  <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"  (success)"</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>inc-success-counter
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"  (fail)"</span> .s .l
    <span style="color: #fd971f; font-weight: bold;">module-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>inc-fail-counter
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org897a809" class="outline-3">
<h3 id="org897a809"><span class="done test">test</span> </h3>
<div class="outline-text-3" id="text-org897a809">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #FF8888;">&lt;&lt; in system shell</span>
<span style="color: #FF8888;">cn moi add hi module/hi.cn</span>
<span style="color: #FF8888;">cn moi add hihi module/hihi.cn</span>
<span style="color: #FF8888;">&gt;&gt;</span>

<span style="color: #e6db74;">"hihi"</span> <span style="color: #a6e22e; font-weight: bold;">load-with-test</span>

hihi <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*test-module-info*</span>
  <span style="color: #f92672; font-weight: bold;">name</span> hihi <span style="color: #ffffff; font-weight: bold;">module-stack:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
  <span style="color: #f92672; font-weight: bold;">else</span>
    <span style="color: #e6db74;">"* can not found hihi"</span> .s .l
  <span style="color: #f92672; font-weight: bold;">then</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable</span>

<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-meta-string .s .l
<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name name<span style="color: #b0b1a3;">-&gt;</span>string .s .l

hihi <span style="color: #FF8888;">&lt;&lt; undefined &gt;&gt;</span>

<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name-record-begin
<span style="color: #fd971f; font-weight: bold;">*test-module-info*</span> <span style="color: #ffffff; font-weight: bold;">module-info:</span>get-name-record-end
<span style="color: #ffffff; font-weight: bold;">module-naming-stack:</span>expose-naming

hihi


<span style="color: #ffffff; font-weight: bold;">report:</span>memory

<span style="color: #e6db74;">"no"</span> <span style="color: #a6e22e; font-weight: bold;">load-with-test</span>
<span style="color: #e6db74;">"hihi"</span> <span style="color: #a6e22e; font-weight: bold;">load-with-test</span>

<span style="color: #ffffff; font-weight: bold;">report:</span>memory
</pre>
</div>
</div>
</div>

<div id="outline-container-orgec9f732" class="outline-3">
<h3 id="orgec9f732"><span class="done test">test</span> with gamber</h3>
<div class="outline-text-3" id="text-orgec9f732">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #e6db74;">"gamber"</span> <span style="color: #a6e22e; font-weight: bold;">load-with-test</span>
</pre>
</div>
</div>
</div>
</div>


<div id="outline-container-orgff50378" class="outline-2">
<h2 id="orgff50378">type</h2>
</div>


<div id="outline-container-orgb5a0942" class="outline-2">
<h2 id="orgb5a0942">report</h2>
<div class="outline-text-2" id="text-orgb5a0942">
</div><div id="outline-container-org79d0ae1" class="outline-3">
<h3 id="org79d0ae1">report:memory</h3>
<div class="outline-text-3" id="text-org79d0ae1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">report:memory</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"* *un-initialized-memory*"</span> .s .l
  <span style="color: #e6db74;">"  * size : "</span> .s
       <span style="color: #fd971f; font-weight: bold;">*un-initialized-memory,size*</span>
       . .l
  <span style="color: #e6db74;">"  * used : "</span> .s
       <span style="color: #fd971f; font-weight: bold;">*un-initialized-memory,current-free-address*</span>
       <span style="color: #fd971f; font-weight: bold;">*un-initialized-memory*</span>
       sub . .l
  <span style="color: #e6db74;">"  * free : "</span> .s
       <span style="color: #fd971f; font-weight: bold;">*un-initialized-memory,size*</span>
       <span style="color: #fd971f; font-weight: bold;">*un-initialized-memory,current-free-address*</span>
       <span style="color: #fd971f; font-weight: bold;">*un-initialized-memory*</span>
       sub sub . .l
  <span style="color: #e6db74;">"* *string-area*"</span> .s .l
  <span style="color: #e6db74;">"  * size : "</span> .s
       <span style="color: #fd971f; font-weight: bold;">*string-area,size*</span>
       . .l
  <span style="color: #e6db74;">"  * used : "</span> .s
       <span style="color: #fd971f; font-weight: bold;">*string-area,current-free-address*</span>
       <span style="color: #fd971f; font-weight: bold;">*string-area*</span>
       sub . .l
  <span style="color: #e6db74;">"  * free : "</span> .s
       <span style="color: #fd971f; font-weight: bold;">*string-area,size*</span>
       <span style="color: #fd971f; font-weight: bold;">*string-area,current-free-address*</span>
       <span style="color: #fd971f; font-weight: bold;">*string-area*</span>
       sub sub . .l
  <span style="color: #e6db74;">"* *jojo-area*"</span> .s .l
  <span style="color: #e6db74;">"  * size : "</span> .s
       <span style="color: #fd971f; font-weight: bold;">*jojo-area,size*</span> . .l
  <span style="color: #e6db74;">"  * used : "</span> .s
       <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
       <span style="color: #fd971f; font-weight: bold;">*jojo-area*</span>
       sub . .l
  <span style="color: #e6db74;">"  * free : "</span> .s
       <span style="color: #fd971f; font-weight: bold;">*jojo-area,size*</span>
       <span style="color: #fd971f; font-weight: bold;">*jojo-area,current-free-address*</span>
       <span style="color: #fd971f; font-weight: bold;">*jojo-area*</span>
       sub sub . .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgbf12514" class="outline-3">
<h3 id="orgbf12514">report:syntax</h3>
<div class="outline-text-3" id="text-orgbf12514">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">report:syntax</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"* jojo-compiler:*syntax-rule-set* :"</span> .s .l
     <span style="color: #fd971f; font-weight: bold;">jojo-compiler:*syntax-rule-set*</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>list
  <span style="color: #e6db74;">"* syntax-rule-set:*word-interpreter* :"</span> .s .l
     <span style="color: #fd971f; font-weight: bold;">syntax-rule-set:*word-interpreter*</span> <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>list
  <span style="color: #e6db74;">"* tos-syntax-stack :"</span> .s .l
     tos-syntax-stack <span style="color: #ffffff; font-weight: bold;">syntax-rule-set:</span>list
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org2432754" class="outline-3">
<h3 id="org2432754">global-naming-stack:list-by-jo-predicate</h3>
<div class="outline-text-3" id="text-org2432754">
<ul class="org-ul">
<li><p>最後寫到珠典裏的 被最先打印出來</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">global-naming-stack:list-by-jo-predicate,loop</span>
  <span style="color: #FF8888;">&lt;&lt; jo-predicate, counter, cursor -- &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*pointer*</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span>
    drop
    drop
    drop
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:cursor</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:counter</span>
  <span style="color: #FF4C4C; font-weight: bold;">&gt;:jo-predicate</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-new-jo
  <span style="color: #83EA83; font-weight: bold;">:jo-predicate</span> apply <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"  "</span> .s
    <span style="color: #83EA83; font-weight: bold;">:counter</span> .i <span style="color: #e6db74;">". "</span> .s <span style="color: #83EA83; font-weight: bold;">:counter</span> add1 <span style="color: #FF4C4C; font-weight: bold;">&gt;:counter</span>
    <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #ffffff; font-weight: bold;">name-record:</span>get-name name<span style="color: #b0b1a3;">-&gt;</span>string .s
    .l
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #83EA83; font-weight: bold;">:jo-predicate</span>
  <span style="color: #83EA83; font-weight: bold;">:counter</span>
  <span style="color: #83EA83; font-weight: bold;">:cursor</span> <span style="color: #fd971f; font-weight: bold;">global-naming-stack:*unit*</span> add
  <span style="color: #00ffff; font-weight: bold;">loop</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">global-naming-stack:list-by-jo-predicate</span>
  <span style="color: #FF8888;">&lt;&lt; jo-predicate -- &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">1</span>
  <span style="color: #fd971f; font-weight: bold;">*global-naming-stack*</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>list-by-jo-predicate,loop
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orgd6c5b29" class="outline-3">
<h3 id="orgd6c5b29">report:global-naming-stack</h3>
<div class="outline-text-3" id="text-orgd6c5b29">
<ul class="org-ul">
<li><p>different types of words in link</p><p>are showed separately</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">report:global-naming-stack</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"* all primitive-function in global-naming-stack :"</span> .s .l
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">primitive-function-jo?</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>list-by-jo-predicate

  <span style="color: #e6db74;">"* all function in global-naming-stack :"</span> .s .l
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">function-jo?</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>list-by-jo-predicate

  <span style="color: #e6db74;">"* all variable in global-naming-stack :"</span> .s .l
  <span style="color: #f92672; font-weight: bold;">jo</span> <span style="color: #ffffff; font-weight: bold;">variable-jo?</span>
  <span style="color: #ffffff; font-weight: bold;">global-naming-stack:</span>list-by-jo-predicate
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org7cd8611" class="outline-3">
<h3 id="org7cd8611">report:system</h3>
<div class="outline-text-3" id="text-org7cd8611">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">report:system</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"* (system) "</span> .s
  <span style="color: #fd971f; font-weight: bold;">*cell-size*</span> <span style="color: #fd971f; font-weight: bold;">8</span> mul .i <span style="color: #e6db74;">"bit"</span> .s
  <span style="color: #e6db74;">" "</span> .s
  platform .s
  .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-org6366930" class="outline-2">
<h2 id="org6366930">hi</h2>
<div class="outline-text-2" id="text-org6366930">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #fd971f; font-weight: bold;">0</span>
<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #fd971f; font-weight: bold;">*hi,random-base*</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #a1ab3a; font-weight: bold;">define-variable,with-tos</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">hi,random</span>
  <span style="color: #FF8888;">&lt;&lt; -- random-number &gt;&gt;</span>
  <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #fd971f; font-weight: bold;">syscall-number:*times*</span>
  <span style="color: #fd971f; font-weight: bold;">1</span> syscall
  <span style="color: #fd971f; font-weight: bold;">13</span> mod
  <span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">   *hi,random-base*</span>
<span style="color: #FF8888;">   *hi,random-base* add1 13 mod</span>
<span style="color: #FF8888;">   address *hi,random-base* set</span>
<span style="color: #FF8888;">  &gt;&gt;</span>
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">hi,say</span>
  <span style="color: #FF8888;">&lt;&lt; number -- &gt;&gt;</span>
  dup <span style="color: #fd971f; font-weight: bold;">0</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"cica cica da yaya !!!"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">1</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"hi ^-^"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">2</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"hello :)"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">3</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"hey *^-^*"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">4</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"hiya \^o^/"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">5</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"I wish you a lovely day"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">6</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"I wish you a lovely day { or night :P }"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">7</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"o.o"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">8</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"O.o"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
  dup <span style="color: #fd971f; font-weight: bold;">9</span> <span style="color: #ffffff; font-weight: bold;">equal?</span> <span style="color: #f92672; font-weight: bold;">if</span> drop <span style="color: #e6db74;">"o.O"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span> <span style="color: #f92672; font-weight: bold;">then</span>
                  drop <span style="color: #e6db74;">"lovely ^3^"</span> .s .l <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>

<span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">hi</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  hi,random
  hi,say
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org7c3e768" class="outline-2">
<h2 id="org7c3e768">help</h2>
<div class="outline-text-2" id="text-org7c3e768">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">help</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"* helpful documentations will be written soon"</span> .s .l
  <span style="color: #e6db74;">"  please wait ^-^"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org7171480" class="outline-2">
<h2 id="org7171480">command line interface</h2>
<div class="outline-text-2" id="text-org7171480">
</div><div id="outline-container-orgf4a57fa" class="outline-3">
<h3 id="orgf4a57fa">command-function:unknow-function</h3>
<div class="outline-text-3" id="text-orgf4a57fa">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">command-function:unknow-function</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #e6db74;">"* (cicada-nymph) unknow command-line-function : "</span> .s
  get-command-line
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #ffffff; font-weight: bold;">string:</span>word .s .l
  <span style="color: #e6db74;">"  good bye ^-^/"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">bye</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org9e988f5" class="outline-3">
<h3 id="org9e988f5">command-function:stack-REPL</h3>
<div class="outline-text-3" id="text-org9e988f5">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">command-function:stack-REPL</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  .l
  <span style="color: #e6db74;">"* (cicada-nymph) "</span> .s hi
  <span style="color: #ffffff; font-weight: bold;">report:</span>system
  <span style="color: #e6db74;">"* (stack-REPL) is where you are now"</span> .s .l
  <span style="color: #e6db74;">"  eval a word print the stack"</span> .s .l
  <span style="color: #ffffff; font-weight: bold;">argument-stack:</span>pretty-print
  <span style="color: #f92672; font-weight: bold;">jo</span> stack-REPL
  <span style="color: #00ffff; font-weight: bold;">reset-top-level-REPL</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org27907c5" class="outline-3">
<h3 id="org27907c5">command-function:basic-REPL</h3>
<div class="outline-text-3" id="text-org27907c5">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">command-function:basic-REPL</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  .l
  <span style="color: #e6db74;">"* (cicada-nymph) "</span> .s hi
  <span style="color: #ffffff; font-weight: bold;">report:</span>system
  <span style="color: #e6db74;">"* (basic-REPL) is where you are now"</span> .s .l
  <span style="color: #e6db74;">"  this REPL does not print any thing automaticly"</span> .s .l
  <span style="color: #f92672; font-weight: bold;">jo</span> basic-REPL
  <span style="color: #00ffff; font-weight: bold;">reset-top-level-REPL</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org54f0c97" class="outline-3">
<h3 id="org54f0c97">command-function:poi</h3>
<div class="outline-text-3" id="text-org54f0c97">
<ul class="org-ul">
<li><p>cn poi add  &lt;name&gt; &lt;relative-path&gt;</p></li>
<li><p>cn poi sub  &lt;name&gt;</p></li>
<li><p>cn poi up   &lt;name&gt; &lt;relative-path&gt;</p></li>
<li><p>cn poi find &lt;name&gt;</p></li>
<li><p>cn poi list</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">command-function:poi</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  get-command-line
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #dc322f; font-weight: bold;">&gt;::command-line</span>

  <span style="color: #5CDD5C; font-weight: bold;">::command-line</span> <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">poi:</span>help
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::command-line</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word <span style="color: #dc322f; font-weight: bold;">&gt;::sub-function-name</span>
  <span style="color: #5CDD5C; font-weight: bold;">::command-line</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #dc322f; font-weight: bold;">&gt;::command-line-arguments</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"help"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">poi:</span>help
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"add"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #ffffff; font-weight: bold;">poi:</span>add
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"sub"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #ffffff; font-weight: bold;">poi:</span>sub
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"up"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #ffffff; font-weight: bold;">poi:</span>up
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"find"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #ffffff; font-weight: bold;">poi:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
      .s .l
    <span style="color: #f92672; font-weight: bold;">else</span>
      <span style="color: #e6db74;">"no found"</span> .s .l
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"list"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">poi:</span>list
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #e6db74;">"* (command-function:poi) meets argument that (command-function:poi) can not understand"</span> .s .l
  <span style="color: #e6db74;">"  it is the following command-line that is confusing (command-function:poi) :"</span> .s .l
  <span style="color: #e6db74;">"    "</span> .s <span style="color: #ffffff; font-weight: bold;">report:</span>command-line .l
  <span style="color: #e6db74;">"  to get some help info  you can type :"</span> .s .l
  <span style="color: #e6db74;">"    cn poi help"</span> .s .l
  <span style="color: #e6db74;">"  good bye ^-^/"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">bye</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org74c076e" class="outline-3">
<h3 id="org74c076e">command-function:moi</h3>
<div class="outline-text-3" id="text-org74c076e">
<ul class="org-ul">
<li><p>cn module add  &lt;name&gt; &lt;relative-path&gt;</p></li>
<li><p>cn module sub  &lt;name&gt;</p></li>
<li><p>cn module up   &lt;name&gt; &lt;relative-path&gt;</p></li>
<li><p>cn module find &lt;name&gt;</p></li>
<li><p>cn module list</p></li></ul>
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">command-function:moi</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  get-command-line
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #dc322f; font-weight: bold;">&gt;::command-line</span>

  <span style="color: #5CDD5C; font-weight: bold;">::command-line</span> <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">moi:</span>help
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::command-line</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word <span style="color: #dc322f; font-weight: bold;">&gt;::sub-function-name</span>
  <span style="color: #5CDD5C; font-weight: bold;">::command-line</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #dc322f; font-weight: bold;">&gt;::command-line-arguments</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"help"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">moi:</span>help
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"add"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #ffffff; font-weight: bold;">moi:</span>add
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"sub"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #ffffff; font-weight: bold;">moi:</span>sub
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"up"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #ffffff; font-weight: bold;">moi:</span>up
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"find"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #5CDD5C; font-weight: bold;">::command-line-arguments</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word
    <span style="color: #ffffff; font-weight: bold;">moi:</span>find <span style="color: #f92672; font-weight: bold;">if</span>
      .s .l
    <span style="color: #f92672; font-weight: bold;">else</span>
      <span style="color: #e6db74;">"no found"</span> .s .l
    <span style="color: #f92672; font-weight: bold;">then</span>
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #5CDD5C; font-weight: bold;">::sub-function-name</span> <span style="color: #e6db74;">"list"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">moi:</span>list
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>

  <span style="color: #e6db74;">"* (command-function:moi) meets argument that (command-function:moi) can not understand"</span> .s .l
  <span style="color: #e6db74;">"  it is the following command-line that is confusing (command-function:moi) :"</span> .s .l
  <span style="color: #e6db74;">"    "</span> .s <span style="color: #ffffff; font-weight: bold;">report:</span>command-line .l
  <span style="color: #e6db74;">"  to get some help info  you can type :"</span> .s .l
  <span style="color: #e6db74;">"    cn module help"</span> .s .l
  <span style="color: #e6db74;">"  good bye ^-^/"</span> .s .l
  <span style="color: #00ffff; font-weight: bold;">bye</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-orga720b3a" class="outline-3">
<h3 id="orga720b3a">command-function:load</h3>
<div class="outline-text-3" id="text-orga720b3a">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">command-function:load</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  get-command-line
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #dc322f; font-weight: bold;">&gt;::command-line</span>
  <span style="color: #5CDD5C; font-weight: bold;">::command-line</span> <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (command-function:load) is called with no argument"</span> .s .l
    <span style="color: #e6db74;">"  it should be called with a name of module"</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::command-line</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word <span style="color: #a6e22e; font-weight: bold;">load</span>
  <span style="color: #00ffff; font-weight: bold;">bye</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org56a2b43" class="outline-3">
<h3 id="org56a2b43">command-function:load-with-test</h3>
<div class="outline-text-3" id="text-org56a2b43">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">command-function:load-with-test</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  get-command-line
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail <span style="color: #dc322f; font-weight: bold;">&gt;::command-line</span>
  <span style="color: #5CDD5C; font-weight: bold;">::command-line</span> <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #e6db74;">"* (command-function:load-with-test) is called with no argument"</span> .s .l
    <span style="color: #e6db74;">"  it should be called with a name of module"</span> .s .l
    <span style="color: #00ffff; font-weight: bold;">bye</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::command-line</span> <span style="color: #ffffff; font-weight: bold;">string:</span>word <span style="color: #a6e22e; font-weight: bold;">load-with-test</span>
  <span style="color: #00ffff; font-weight: bold;">bye</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org33a0ed9" class="outline-3">
<h3 id="org33a0ed9">command-function:no-function</h3>
<div class="outline-text-3" id="text-org33a0ed9">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">command-function:no-function</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  <span style="color: #ffffff; font-weight: bold;">command-function:</span>stack-REPL
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>

<div id="outline-container-org9899296" class="outline-3">
<h3 id="org9899296">command:dispatch</h3>
<div class="outline-text-3" id="text-org9899296">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffff00; font-weight: bold;">:</span> <span style="color: #ef5939; font-weight: bold;">command:dispatch</span>
  <span style="color: #FF8888;">&lt;&lt; -- &gt;&gt;</span>
  get-command-line
  <span style="color: #ffffff; font-weight: bold;">string:</span>word-tail
  dup2 <span style="color: #ffffff; font-weight: bold;">string:</span>space? <span style="color: #f92672; font-weight: bold;">if</span>
    drop2
    <span style="color: #ffffff; font-weight: bold;">command-function:</span>no-function
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">string:</span>word
  <span style="color: #dc322f; font-weight: bold;">&gt;::1st-word</span>
  <span style="color: #5CDD5C; font-weight: bold;">::1st-word</span> <span style="color: #e6db74;">"basic-REPL"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">command-function:</span>basic-REPL
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::1st-word</span> <span style="color: #e6db74;">"stack-REPL"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">command-function:</span>stack-REPL
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::1st-word</span> <span style="color: #e6db74;">"poi"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">command-function:</span>poi
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::1st-word</span> <span style="color: #e6db74;">"moi"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">command-function:</span>moi
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::1st-word</span> <span style="color: #e6db74;">"load"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">command-function:</span>load
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #5CDD5C; font-weight: bold;">::1st-word</span> <span style="color: #e6db74;">"load-with-test"</span> <span style="color: #ffffff; font-weight: bold;">string:</span>equal? <span style="color: #f92672; font-weight: bold;">if</span>
    <span style="color: #ffffff; font-weight: bold;">command-function:</span>load-with-test
    <span style="color: #00ffff; font-weight: bold;">end</span>
  <span style="color: #f92672; font-weight: bold;">then</span>
  <span style="color: #ffffff; font-weight: bold;">command-function:</span>unknow-function
  <span style="color: #00ffff; font-weight: bold;">end</span>
<span style="color: #ffff00; font-weight: bold;">;</span> <span style="color: #ae81ff; font-weight: bold;">define-function</span>
</pre>
</div>
</div>
</div>
</div>

<div id="outline-container-orgc906ee1" class="outline-2">
<h2 id="orgc906ee1"><b>the story begin</b></h2>
<div class="outline-text-2" id="text-orgc906ee1">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #ffffff; font-weight: bold;">command:</span>dispatch
</pre>
</div>
</div>
</div>



<div id="outline-container-org7566498" class="outline-2">
<h2 id="org7566498"><span class="done test">test</span> </h2>
<div class="outline-text-2" id="text-org7566498">
<div class="org-src-container">

<pre class="src src-cicada-nymph"><span style="color: #e6db74;">"core-test"</span> <span style="color: #a6e22e; font-weight: bold;">load-with-test</span>

<span style="color: #ffffff; font-weight: bold;">report:</span>system
<span style="color: #ffffff; font-weight: bold;">report:</span>memory
<span style="color: #ffffff; font-weight: bold;">report:</span>global-naming-stack
<span style="color: #FF8888;">&lt;&lt;</span>
<span style="color: #FF8888;">report:syntax</span>
<span style="color: #FF8888;">report:command-line</span>
<span style="color: #FF8888;">report:environment-variable</span>
<span style="color: #FF8888;">&gt;&gt;</span>
</pre>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
近死之心 莫使復陽也
</div>
</body>
</html>
